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

Added 'files mv' command to rename files #86

Merged
merged 5 commits into from
May 30, 2019
Merged

Added 'files mv' command to rename files #86

merged 5 commits into from
May 30, 2019

Conversation

mschroering
Copy link
Contributor

No description provided.

lib/cmds/files_cmds/mv.js Outdated Show resolved Hide resolved

const response = await list(argv, `/v1/files?${querystring.stringify(opts)}`);
for (const item of response.data.items) {
const newName = path.join(argv.dest, item.name.replace(prefix, ''));
Copy link
Contributor

Choose a reason for hiding this comment

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

On windows path.join() is going to use \ rather than / which isn't what we want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Fixed.

@mschroering mschroering merged commit b09bcdc into master May 30, 2019
@mschroering mschroering deleted the file-mv branch May 30, 2019 19:02
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.

2 participants