Skip to content

Commit

Permalink
#86 : Specify appropriate .dat file path for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
s-takeuchi committed Oct 31, 2024
1 parent b68f5d9 commit bdd0ffd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/restapi/dataaccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,16 @@ int DataAccess::CreateCmdFreakTables()
// Make full path name and call AutoSave
wchar_t Buf[FILENAME_MAX];
StkPlGetFullPathFromFileName(DataFileName, Buf);
size_t WorkDatLength = StkPlGetFileSize(Buf);
if (WorkDatLength == (size_t)-1) {
#ifdef WIN32
return -1;
#endif
#ifndef WIN32
StkPlSwPrintf(Buf, FILENAME_MAX, L"/etc/%ls", DataFileName);
#endif
}

AutoSave(Buf, 30, true);

LockAllTable(2);
Expand Down

0 comments on commit bdd0ffd

Please sign in to comment.