Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@UziTech
Copy link
Contributor

@UziTech UziTech commented Feb 2, 2018

Description of the Change

use path.join instead of hard coding a slash

Applicable Issues

#1179 (comment)


entryName = path.basename(initialPath)
newPath = "#{newDirectoryPath}/#{entryName}".replace(/\s+$/, '')
newPath = path.join(newDirectoryPath, entryName).replace(/\s+$/, '')
Copy link
Contributor

Choose a reason for hiding this comment

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

I also don't think the replace is necessary. I haven't seen any other case where we trim paths.

@winstliu winstliu merged commit a464aa6 into atom:master Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants