common : use fs::path for cache dirs (#29595)
- Avoid useless string conversions on Windows. - No need for BSD or emscripten special cases. Signed-off-by: Adrien Gallouët <angt@huggingface.co>
This commit is contained in:
1 parent
46e17a6352
commit
76a5bc86d1
6 files changed
+113
-131
No files matched your search
+1
-1
@@ -351,7 +351,7 @@ static bool parse_bool_value(const std::string & value) {
|
||||
static std::string get_default_local_path(const std::string & url) {
|
||||
auto f = string_split<std::string>(url, '#').front();
|
||||
f = string_split<std::string>(f, '?').front();
|
||||
return fs_get_cache_file(string_split<std::string>(f, '/').back());
|
||||
return fs_path_to_utf8(fs_get_cache_file(string_split<std::string>(f, '/').back()));
|
||||
}
|
||||
|
||||
static bool spec_types_is_default(const common_params & params) {
|
||||
|
||||
Reference in new issue
Block a user