Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move: do not create parent directory if it is root #897

Merged
merged 6 commits into from
May 3, 2021

Conversation

manidlou
Copy link
Collaborator

@manidlou manidlou commented May 1, 2021

Fixes #819.

Do not create parent directory if it is root. We run tests for this only on windows, moving to root on unix-like systems requires sudo privileges.

@manidlou manidlou self-assigned this May 1, 2021
@manidlou manidlou requested review from JPeer264 and RyanZim May 1, 2021 19:39
Copy link
Collaborator

@RyanZim RyanZim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but one flaw with the cleanup code in the tests; they will not run properly if the tests fail.

// this test is a bit special since
// we're moving to root, so we need to
// manually remove dest after we're done.
fse.removeSync(dest)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in an afterEach in this describeIfWindows block.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! I will update it then.

// this test is a bit special since
// we're moving to root, so we need to
// manually remove dest after we're done.
fse.remove(dest, done)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@RyanZim RyanZim added this to the 10.0.0 milestone May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move fails with EPERM when destination is in root of drive
2 participants