Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - (Windows) Comparing paths can fail on non-native filesep in aa_init #266

Closed
AljenU opened this issue Oct 25, 2021 · 0 comments · Fixed by #291
Closed

BUG - (Windows) Comparing paths can fail on non-native filesep in aa_init #266

AljenU opened this issue Oct 25, 2021 · 0 comments · Fixed by #291
Labels

Comments

@AljenU
Copy link
Collaborator

AljenU commented Oct 25, 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.

@AljenU AljenU added the bug label Oct 25, 2021
@AljenU 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant