Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Reading the root of a drive on windows results extra 'snapshot' directory #1929

Closed
vicapow opened this issue May 11, 2023 · 4 comments
Closed

Comments

@vicapow
Copy link

vicapow commented May 11, 2023

What version of pkg are you using?

5.8.0

What version of Node.js are you using?

v10.23.1

What operating system are you using?

windows

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

node18-win-x64

Describe the Bug

The binary exists on the C:\. The binary then attempts to read a drive on say E:\ using readdir()

ie.,

let dirents = await readdir(dir, { withFileTypes: true });

but this inaccurately returns an extra folder called snapshot on the E:\ drive. I understand there is this snapshot filesystem but I would not have expected this it override file system calls from another drive. With the current behavior, we cannot have a cli binary that can read the entire drive contents without either explicitly ignoring all drives with a root folder names snapshot that happens to actually be on that drive, or explicitly not allow reading drive contents with a snapshot directory.

Expected Behavior

Allow having readdir work for an entire drive other than the one that contains the binary.

To Reproduce

Create a binary, setup a new drive, E:, run on windows, attempt to read the drive using readdir giving it E:\ as the readdir argument path. see that it returns a snapshot directory on E:\ which was not expected

@Renari
Copy link

Renari commented May 12, 2023

I think this may be the same issue I was having here: https://github.com/vercel/pkg/discussions/1928

@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

Copy link

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

@github-actions github-actions bot added the Stale label Nov 11, 2023
@Renari
Copy link

Renari commented Nov 11, 2023

still relevant

@github-actions github-actions bot removed the Stale label Nov 12, 2023
@leerob leerob closed this as completed Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants