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

Moving a file into an existing directory #111

Closed

Conversation

kosmasgiannis
Copy link

I believe this time it is OK.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.12%) to 81.39% when pulling 3ba42db on kosmasgiannis:move-dest-dir-exists into 6dcc634 on jprichardson:master.

@jprichardson
Copy link
Owner

Thanks for your patience :) OK, I've reviewed this. In the move tests, I started switching from npm testutil to './lib/util' which doesn't have any parameter as seen here: https://github.com/jprichardson/node-fs-extra/blob/master/test/lib/util.js#L19 so just so I'm clear, it's your intent that TEST_DIR === EXISTING_DIR, right?

@jprichardson
Copy link
Owner

Ok, I have time to look at this again. Thanks for your patience!! So that I understand the nuances of this and what you're trying to achieve here, you want to emulate something like:

mv /tmp/somedir/a-file /tmp/some-other-dir-that-already-exists/

So that now /tmp/some-other-dir-that-already-exists/a-file exists? i.e. You don't want to have to explicitly declare a-file in the destination parameter?

@jprichardson
Copy link
Owner

I'm going to close this. Originally when I said that I was in favor, I misunderstood. Sorry about that. I'd like this feature in the future, but I want it to be explicit something like fs.move('/some/file', '/dir/.'). But fs-extra is a way off from this. Thanks for taking the time though, I really appreciate it.

pabigot added a commit to pabigot/node-fs-extra that referenced this pull request Aug 24, 2016
The original mkdirp mis-handles the fourth parameter when a directory
component is missing.  The same issue is present in the fs-extra
variant.

See: https://github.com/substack/node-mkdirp/issues/111
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants