Skip to content

Commit

Permalink
Bugfix: fixed the excel cannot export to xml when using linux wsp
Browse files Browse the repository at this point in the history
  • Loading branch information
i0gan committed Sep 21, 2024
1 parent 324a060 commit 9eb71ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/tools/sqkctl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ set_target_properties( ${proName} PROPERTIES
)
endmacro(SquickOut)

if (UNIX)
SET ( CMAKE_CXX_FLAGS "-g" )
endif()

SquickOut(${ProjectName} ${ProjectName} ${SolutionDir}/tools/bin ${ProjectName})
add_definitions(
-D_CRT_SECURE_NO_WARNINGS
Expand Down
4 changes: 3 additions & 1 deletion src/tools/sqkctl/excel/mini_excel_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool Zip::open(const char *file) {
char szCurrentFileName[PATH_MAX];
unz_file_info64 fileInfo;

int err = unzGoToNextFile2(_zipFile, &fileInfo, szCurrentFileName, sizeof(szCurrentFileName) - 1, nullptr, 0, nullptr, 0);
int err = unzGoToFirstFile2(_zipFile, &fileInfo, szCurrentFileName, sizeof(szCurrentFileName) - 1, nullptr, 0, nullptr, 0);
while (err == UNZ_OK) {
unz_file_pos posInfo;
if (unzGetFilePos(_zipFile, &posInfo) == UNZ_OK) {
Expand All @@ -52,7 +52,9 @@ bool Zip::open(const char *file) {
entry.uncompressed_size = (uLong)fileInfo.uncompressed_size;
_files[currentFileName] = entry;
}
// std::cout << file << " loading: " << szCurrentFileName << " " << err << std::endl;
err = unzGoToNextFile2(_zipFile, &fileInfo, szCurrentFileName, sizeof(szCurrentFileName) - 1, nullptr, 0, nullptr, 0);

}

return true;
Expand Down

0 comments on commit 9eb71ab

Please sign in to comment.