knossos-project/knossos_utils

Path handling works only for linux-style "/" separator

Closed this issue · 4 comments

Windows path ("/" separated) are completely not taken into account.

You know windows supports both?

Windows supports both, but our code currently doesn't supports Windows.

It's not even fully supported on Windows, try "dir c:/temp/" on command line.

The current bug was that glob.glob returns a backslash on Windows, while the code expects hard-coded forward slash everywhere.
For now I solve the problem by replacing the OS path separator with a hard-coded forward-slash.
The current long-term solution is just to keep using hard-coded forward-slash everywhere, and treat each backward-slash case (as above) adequately.
The user is therefore also expected to pass only forward-slashed paths to DatasetUtils. I documented this in the function docs.