Skip to content

Commit

Permalink
Don't convert backslashes
Browse files Browse the repository at this point in the history
not sure why it was added in the first place but it seems to be causing problems here:
mifi/lossless-cut#1941

e.g. on macos when trying to encode a file name with a backslash in it, it causes the backslashe to interpreted as forward slashes, which is not correct and causes the process opening the file to fail
  • Loading branch information
mifi authored Apr 1, 2024
1 parent 982123e commit 2c5ef97
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export default function fileUrl(filePath, options = {}) {
pathName = path.resolve(filePath);
}

pathName = pathName.replace(/\\/g, '/');

// Windows drive letter must be prefixed with a slash.
if (pathName[0] !== '/') {
pathName = `/${pathName}`;
Expand Down

0 comments on commit 2c5ef97

Please sign in to comment.