better code style
This commit is contained in:
parent
e0a2d830ca
commit
43321db396
1 changed files with 2 additions and 3 deletions
|
@ -1863,7 +1863,7 @@ std::string fs_get_cache_directory() {
|
|||
return p;
|
||||
};
|
||||
if (getenv("LLAMA_CACHE")) {
|
||||
cache_directory = ensure_trailing_slash(std::getenv("LLAMA_CACHE"));
|
||||
cache_directory = std::getenv("LLAMA_CACHE");
|
||||
} else {
|
||||
#ifdef __linux__
|
||||
if (std::getenv("XDG_CACHE_HOME")) {
|
||||
|
@ -1878,9 +1878,8 @@ std::string fs_get_cache_directory() {
|
|||
#endif // __linux__
|
||||
cache_directory = ensure_trailing_slash(cache_directory);
|
||||
cache_directory += "llama.cpp";
|
||||
cache_directory += DIRECTORY_SEPARATOR;
|
||||
}
|
||||
return cache_directory;
|
||||
return ensure_trailing_slash(cache_directory);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue