|
@@ -29,28 +29,17 @@ struct sp_pst_elem_t {
|
|
|
|
|
|
static const char *get_full_path(const char *base_dir, const char *ent, const char *cls, const char *obj, char *buf)
|
|
|
{
|
|
|
-#ifdef _WIN32
|
|
|
if (cls) {
|
|
|
if (obj) {
|
|
|
- sprintf(buf, "%s\\objects\\%s\\%s\\%s.dat", base_dir, ent, cls, obj);
|
|
|
- } else {
|
|
|
- sprintf(buf, "%s\\objects\\%s\\%s", base_dir, ent, cls);
|
|
|
+ sprintf(buf, "%s" SPLIT_SLASH_STR "objects" SPLIT_SLASH_STR "%s" SPLIT_SLASH_STR "%s" SPLIT_SLASH_STR "%s.dat", base_dir, ent, cls, obj);
|
|
|
}
|
|
|
- } else {
|
|
|
- sprintf(buf, "%s\\objects\\%s", base_dir, ent);
|
|
|
- }
|
|
|
-#else
|
|
|
- if (cls) {
|
|
|
- if (obj) {
|
|
|
- sprintf(buf, "%s/objects/%s/%s/%s.dat", base_dir, ent, cls, obj);
|
|
|
- } else {
|
|
|
- sprintf(buf, "%s/objects/%s/%s", base_dir, ent, cls);
|
|
|
+ else {
|
|
|
+ sprintf(buf, "%s" SPLIT_SLASH_STR "objects" SPLIT_SLASH_STR "%s" SPLIT_SLASH_STR "%s", base_dir, ent, cls);
|
|
|
}
|
|
|
- } else {
|
|
|
- sprintf(buf, "%s/objects/%s", base_dir, ent);
|
|
|
}
|
|
|
-#endif
|
|
|
-
|
|
|
+ else {
|
|
|
+ sprintf(buf, "%s" SPLIT_SLASH_STR "objects" SPLIT_SLASH_STR "%s", base_dir, ent);
|
|
|
+ }
|
|
|
return buf;
|
|
|
}
|
|
|
|
|
@@ -517,12 +506,7 @@ static void recover_persist_dir_files(const char *dir)
|
|
|
WIN32_FIND_DATAA fd;
|
|
|
|
|
|
strcpy(szFile, dir);
|
|
|
- #ifdef _WIN32
|
|
|
- strcat(szFile, "\\*");
|
|
|
- #else
|
|
|
- strcat(szFile, "/*");
|
|
|
- #endif
|
|
|
-
|
|
|
+ strcat(szFile, SPLIT_SLASH_STR "*");
|
|
|
hFind = FindFirstFileA(szFile, &fd);
|
|
|
if (hFind != INVALID_HANDLE_VALUE) {
|
|
|
do {
|