thecodrr/fdir

Problem with double Backslash on Windows

Closed this issue · 0 comments

I cannot use the latest version because of the following change.
For example, in Windows I have the following network path:

\\192.168.1.10\folder1\folder2

The following code also replaces the first \\ to a \.

\192.168.1.10\folder1\folder2

This will then not find any files.

I am currently using the following code.
await new fdir().withMaxDepth(1).withFullPaths().crawl('\\192.168.1.10\folder1\folder2').withPromise();

const SLASHES_REGEX = /[\\/]+/g;

The new option withPathSeparator(separator: "/" | "\") has the same effect.