diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.cpp | 17 | ||||
-rw-r--r-- | src/fileio_type.h | 2 | ||||
-rw-r--r-- | src/os/windows/win32.cpp | 4 |
3 files changed, 20 insertions, 3 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp index 44f2cf5c7..9b9a6f5f5 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -1009,17 +1009,24 @@ void DetermineBasePaths(const char *exe) tmp += PATHSEP; tmp += PERSONAL_DIR[0] == '.' ? &PERSONAL_DIR[1] : PERSONAL_DIR; AppendPathSeparator(tmp); - _searchpaths[SP_PERSONAL_DIR_XDG] = tmp; + + tmp += "content_download"; + AppendPathSeparator(tmp); + _searchpaths[SP_AUTODOWNLOAD_PERSONAL_DIR_XDG] = tmp; } else if (!homedir.empty()) { tmp = homedir; tmp += PATHSEP ".local" PATHSEP "share" PATHSEP; tmp += PERSONAL_DIR[0] == '.' ? &PERSONAL_DIR[1] : PERSONAL_DIR; AppendPathSeparator(tmp); - _searchpaths[SP_PERSONAL_DIR_XDG] = tmp; + + tmp += "content_download"; + AppendPathSeparator(tmp); + _searchpaths[SP_AUTODOWNLOAD_PERSONAL_DIR_XDG] = tmp; } else { _searchpaths[SP_PERSONAL_DIR_XDG].clear(); + _searchpaths[SP_AUTODOWNLOAD_PERSONAL_DIR_XDG].clear(); } #endif @@ -1031,10 +1038,14 @@ void DetermineBasePaths(const char *exe) tmp += PATHSEP; tmp += PERSONAL_DIR; AppendPathSeparator(tmp); - _searchpaths[SP_PERSONAL_DIR] = tmp; + + tmp += "content_download"; + AppendPathSeparator(tmp); + _searchpaths[SP_AUTODOWNLOAD_PERSONAL_DIR] = tmp; } else { _searchpaths[SP_PERSONAL_DIR].clear(); + _searchpaths[SP_AUTODOWNLOAD_PERSONAL_DIR].clear(); } #endif diff --git a/src/fileio_type.h b/src/fileio_type.h index 17be6d60f..14acf0797 100644 --- a/src/fileio_type.h +++ b/src/fileio_type.h @@ -140,6 +140,8 @@ enum Searchpath : unsigned { SP_INSTALLATION_DIR, ///< Search in the installation directory SP_APPLICATION_BUNDLE_DIR, ///< Search within the application bundle SP_AUTODOWNLOAD_DIR, ///< Search within the autodownload directory + SP_AUTODOWNLOAD_PERSONAL_DIR, ///< Search within the autodownload directory located in the personal directory + SP_AUTODOWNLOAD_PERSONAL_DIR_XDG, ///< Search within the autodownload directory located in the personal directory (XDG variant) NUM_SEARCHPATHS }; diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index bbb7e359a..6576ea20d 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -466,6 +466,10 @@ void DetermineBasePaths(const char *exe) tmp += PERSONAL_DIR; AppendPathSeparator(tmp); _searchpaths[SP_PERSONAL_DIR] = tmp; + + tmp += "content_download"; + AppendPathSeparator(tmp); + _searchpaths[SP_AUTODOWNLOAD_PERSONAL_DIR] = tmp; } else { _searchpaths[SP_PERSONAL_DIR].clear(); } |