File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -840,6 +840,21 @@ std::string fs_get_cache_directory() {
840840 cache_directory = std::getenv (" HOME" ) + std::string (" /Library/Caches/" );
841841#elif defined(_WIN32)
842842 cache_directory = std::getenv (" LOCALAPPDATA" );
843+
844+ // llama-server-one START
845+ #elif defined(COSMOCC)
846+ // We don't know what OS we are running on at compile time, just CPU architecture.
847+ // try various environment variables, fall back to ~/.cache.
848+ // FUTURE: Checkj if the directories actually exist.
849+ cache_directory = std::getenv (" LOCALAPPDATA" );
850+ if (cache_directory == " " ) {
851+ cache_directory = std::getenv (" XDG_CACHE_HOME" );
852+ }
853+ if (cache_directory == " " ) {
854+ cache_directory = std::getenv (" HOME" ) + std::string (" /.cache/" );
855+ }
856+
857+ // llama-server-one END
843858#else
844859# error Unknown architecture
845860#endif
You can’t perform that action at this time.
0 commit comments