dingjie / atom-sync

Atom package to sync files bidirectionally between remote host and local over ssh+rsync
MIT License
59 stars 32 forks source link

Sync problem while editing a new file under a newly created folder #5

Open dingjie opened 9 years ago

dingjie commented 9 years ago
  1. Create a new folder under the project called /project/folder1
  2. Create a new file named /project/folder1/newfile1
  3. Put some text, save the file and start syncing

/project/folder1 will become the de facto newfile1 instead of a folder

dingjie commented 9 years ago

A temporary solution before the problem has been fixed:

  1. sync /project after creating /project/folder1
  2. then create /project/folder1/newfile1
chmac commented 8 years ago

Firstly, @dingjie thanks for this awesome package, really makes it easy to develop on a remote machine with plenty of memory. :+1:

I think the issue here is that when a file is created inside a new folder, the sync command looks like:

Syncing from /path/to/new/file user@host:/path/to/new

I think the fix is to use this:

Syncing from /path/to/new/file user@host:/path/to/new/

This should tell rsync to sync this file into the directory on the target server instead of creating a new file called new with the contents of the local file. But from glancing at my sync console, it doesn't look like it's doing this 100% of the time. I'll try to do some more thorough testing if / when I have time...

chmac commented 8 years ago

@dingjie Any ETA on a fix for this? Keeps kicking me in the ass because a file is silently ignored and I can't figure out why...