Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Use path.sep #120

Open
MichaReiser opened this issue Feb 13, 2014 · 0 comments
Open

Use path.sep #120

MichaReiser opened this issue Feb 13, 2014 · 0 comments

Comments

@MichaReiser
Copy link
Contributor

In multiple places '/' is used to check if it is a directory or is appended when missing at the end.

e.g. the following code from libaries.load.

  if (root && !/\/$/.test(root)) {
    root = root + '/';
  }

Instead path.sep should be used to be cross platform compatible.

Maybe a better approach would be to always use / internaly and only call path.normalize when the file or directory should be accessed. This would avoid all the special handling in all the plugins and core code for different path seperators.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant