X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/3e3df32d6d5a426ff11ac1b3734374bf25046b7f..bc4721533e4041a19b42cb247064f9f42c3f9d5f:/projects/stargazer/plugins/store/files/file_store.cpp diff --git a/projects/stargazer/plugins/store/files/file_store.cpp b/projects/stargazer/plugins/store/files/file_store.cpp index 6d8de6c2..62c2519b 100644 --- a/projects/stargazer/plugins/store/files/file_store.cpp +++ b/projects/stargazer/plugins/store/files/file_store.cpp @@ -532,6 +532,7 @@ while ((entry = readdir(d))) errorStr += strerror(errno); errorStr += "'"; printfd(__FILE__, "FILES_STORE::RemoveDir() - unlink failed. Message: '%s'\n", strerror(errno)); + closedir(d); return -1; } } @@ -540,6 +541,7 @@ while ((entry = readdir(d))) { if (RemoveDir(str.c_str())) { + closedir(d); return -1; } @@ -1179,10 +1181,10 @@ if (s2.Error()) for (size_t i = 0; i < DIR_NUM; i++) { char dirName[3]; - snprintf(dirName, 3, "U%d", i); + snprintf(dirName, 3, "U%llu", (unsigned long long)i); s.WriteInt(dirName, stat.up[i]); // Classic s2.WriteInt(dirName, stat.up[i]); // New - snprintf(dirName, 3, "D%d", i); + snprintf(dirName, 3, "D%llu", (unsigned long long)i); s.WriteInt(dirName, stat.down[i]); // Classic s2.WriteInt(dirName, stat.down[i]); // New }