Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

file-watcher doesn't work on changes via sshfs #5

Closed
rainbow-pooping-unicorn opened this issue Jan 8, 2016 · 7 comments
Closed

file-watcher doesn't work on changes via sshfs #5

rainbow-pooping-unicorn opened this issue Jan 8, 2016 · 7 comments
Labels

Comments

@rainbow-pooping-unicorn
Copy link

I have a Problem with files which have changed in my VM. I work with a VM (Debian) in virtualbox which is mounted via sshfs on my mac.
If I edit files on my mac, the vm recognize the changes, but atom doesn't recognize changes, which were made in the vm.

Have you an idea why i have this problem?

@lwblackledge
Copy link
Owner

Interesting. Have you tried recreating this with file-watcher disabled? I
will try to recreate this but I am not sure if I can do anything about it
if it is a core Atom problem.

Just so I am right in the steps:

  1. Files are located on the Mac
  2. Files are shared to VM with sshfs
  3. File is opened in Atom on Debian VM
  4. File is modified on mac
  5. No changes are detected in Atom

Is that correct?

@rainbow-pooping-unicorn
Copy link
Author

Thanks a lot for your fast answer.

I will try this while file-watcher is disabled.
My configuration is like:

  1. My files are located on the VM
  2. files are shared to my Mac via sshfs
  3. file is openend on Mac with Atom
  4. file is modified on the VM
  5. No changes are detected in Atom

@lwblackledge
Copy link
Owner

So I have tried to get sshfs to work for me but I am on Windows 10 and I cannot get it to mount a folder. I'll keep playing around with it but I may not be able to fix this.

@lwblackledge
Copy link
Owner

Also reported by @fractalf, moved from issue #6.

@fractalf
Copy link

@lwblackledge I also had to fight a little to get win-sshfs to work, the problem being different versions colliding. This should work though:

Dokan will maybe ask you do download and install Visuall C++ Redistributable stuff, which I did for both x64 and x86.

@fractalf
Copy link

@lwblackledge Did you ever get win-sshfs to work for you?

@lwblackledge
Copy link
Owner

Thanks to your recommendation I was able to get it running and dig into what was happening.

The issue is that SSHFS is running on top of SFTP, which does not have any support for file notifications (it seems to be request/response only) so only user actions get the latest version.

This is not something I can fix as part of file-watcher but there are some options:

  1. Set up polling on open files, somehow determining if they are mounted over win-sshfs, or just based off a config setting. I'd probably make this a separate module actually, and interface with pathwatcher further down the stack.
  2. Get something like fsnotifier-remote working and hook into those events. I have no idea how to do this :)

I think I will try option 1 and add it as a new package. I'm going to close this as 'wontfix' since I cannot fix it in file-watcher, but I'll link the new package here, if it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants