Skip to content

fs: extract path conversion and validation to getValidatedPath

Almost all path validations within our file system are combined with:

path = toPathIfFileURL(path);
validatePath(path);

So simply extracted them out into getValidatedPath function to internal/fs/utils.js to DRY up the code and reduce duplicating them.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading