Conversation
207ed40 to
4e11d26
Compare
|
Please check that this PR now contains a commit with changes I've made in bd36a11, and I'm the author (?) |
|
Another comment: it looks like the |
8412855 to
f9ebb90
Compare
base/fs.cpp
Outdated
|
|
||
| while (itFrom != baseDirs.end() && itTo != toParts.end() && *itFrom == *itTo) { | ||
| while (itFrom != baseDirs.end() && itTo != toParts.end() && | ||
| base::string_to_lower(*itFrom) == base::string_to_lower((*itTo))) { |
There was a problem hiding this comment.
We cannot do this on Linux (and sometimes depending on the configuration of the macOS file system), but I'd be worried only for Linux which the file system is case sensitive.
3651931 to
eedf10c
Compare
base/fs.cpp
Outdated
| #if LAF_MACOS | ||
| static bool* g_isfilesystemCaseSensitive = nullptr; | ||
|
|
||
| bool isFilesystemCaseSensitive() { |
There was a problem hiding this comment.
Please use snake_case for global/non-member functions.
base/fs.cpp
Outdated
| std::string path1 = get_current_path() + "/filesystemTest.txt"; | ||
| std::string path2 = get_current_path() + "/FilesystemTest.TXT"; | ||
|
|
||
| std::ofstream file1(path1); |
There was a problem hiding this comment.
This can fail in a lot of different ways (e.g. we don't have access to write in the current path). I'd try to avoid checking this on macOS, or investigate the correct way to check if the file system is case sensitive (it might vary from file system/mount point, so I'm not sure if I'd worry about this).
There was a problem hiding this comment.
Ok. In conclusion, should we keep the macOS case-sensitive format as it was originally? Or adopt the new case-insensitive file name comparison, as described in the first pull request?
There was a problem hiding this comment.
I think something like 3651931 is enough, Linux being the only platform where case-sensitive is allowed, and Windows/macOS case-insensitive.
6adc5d8 to
3432af9
Compare
3432af9 to
bc163a0
Compare
Also, the 'get_relative_path(pathA, pathB)' function has been made case-insensitive. This is done to correctly calculate common folders in case one of the entered paths has a case difference.
bc163a0 to
b311782
Compare
Part of the solution of issue aseprite/aseprite#5066