You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The native file separator on Windows is '\', as also returned by the matlab filesep function. However, paths that use '/' as a file separator, or even a combination of forward and backward, are also accepted by Windows as valid path specifiers.
Any paths returned from functions will generally have the native file separator.
Thus, doing e.g.
addpath('C:/Users\username/test')
will not give an error. Afterwards, the first entry in path() will show to be
C:\Users\username\test;
As a result, user provided paths should be checked and/or preprocessed when they are going to be used to compare with code provided paths.
TBD: where and how to do that so it is as failsafe as possible.
The text was updated successfully, but these errors were encountered:
AljenU
changed the title
BUG - Comparing paths on Windows can fail on non-native filesep
BUG - (Windows) Comparing paths can fail on non-native filesep
Nov 5, 2021
AljenU
changed the title
BUG - (Windows) Comparing paths can fail on non-native filesep
BUG - (Windows) Comparing paths can fail on non-native filesep in aa_init
Nov 10, 2021
AljenU
added a commit
to AljenU/automaticanalysis
that referenced
this issue
Nov 10, 2021
Related to #242
The native file separator on Windows is '\', as also returned by the matlab filesep function. However, paths that use '/' as a file separator, or even a combination of forward and backward, are also accepted by Windows as valid path specifiers.
Any paths returned from functions will generally have the native file separator.
Thus, doing e.g.
addpath('C:/Users\username/test')
will not give an error. Afterwards, the first entry in path() will show to be
C:\Users\username\test;
As a result, user provided paths should be checked and/or preprocessed when they are going to be used to compare with code provided paths.
TBD: where and how to do that so it is as failsafe as possible.
The text was updated successfully, but these errors were encountered: