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

Resolve the to real paths when calculating relative path for file upload #201

Merged
merged 1 commit into from
Nov 5, 2015

Conversation

mmolnar
Copy link

@mmolnar mmolnar commented Sep 30, 2015

This will resolve #181

@mmolnar
Copy link
Author

mmolnar commented Sep 30, 2015

Also note that I am not a NodeJS developer, so feel free to rewrite the fix as you see fit.

@mmolnar
Copy link
Author

mmolnar commented Sep 30, 2015

To elaborate on the problem:
The variable @ProjectPath in ScpTransport.coffee contains path to the Project, this path contains a symlink. For example:
@ProjectPath = '/home/user/projects/atom/amazing-project'

But the projects directory in /home/user/ is a symlink to /media/disk/projects .

When uploading the file using 'Upload File' command or when using uploadOnSave the following path is passed:
localFilePath = '/media/disk/projects/atom/amazing-project/upload.file'
But when using 'Upload Folder' command, the following path is passed:
localFilePath = '/home/user/projects/atom/amazing-project/upload.file'

This is causing the value of targetFilePath to contain wrong relative path.

yongkangchen added a commit that referenced this pull request Nov 5, 2015
Resolve the to real paths when calculating relative path for file upload
@yongkangchen yongkangchen merged commit 8fcb681 into yongkangchen:master Nov 5, 2015
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.

uploadOnSave saves to local path instead of remote target
2 participants