1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: return the long path for os.temp_dir() on windows, even for folders like c:\someth~1 (#17623)

This commit is contained in:
Delyan Angelov
2023-03-14 00:51:52 +02:00
committed by GitHub
parent d1d26893f5
commit daa9034583
5 changed files with 35 additions and 1 deletions

View File

@ -183,3 +183,9 @@ pub fn is_readable(path string) bool {
return false
}
}
// get_long_path has no meaning for *nix, but has for windows, where `c:\folder\some~1` for example
// can be the equivalent of `c:\folder\some spa ces`. On *nix, it just returns a copy of the input path.
fn get_long_path(path string) !string {
return path
}