jachin / GitSync

This tool allows a developer to work on files on their local machine and have their work synced on a remote system. It uses git to manage the syncing process.
MIT License
31 stars 3 forks source link

Exception occurs if local path is not case mindful #16

Closed centerorbit closed 10 years ago

centerorbit commented 10 years ago

Example: If local path in yaml file reads:

local_path: /Users/andy/Files/folder_to_sync

But the actual directory structure exists as:

Users -> andy -> files -> folder_to_sync

GitSync will start fine, and I think even perform the initial sync. But once a filesystem change event occures, this exception is thrown. My guess is that fsevents.py discriminates against case insensitivity, whereas other libraries and tools in use do not.

The following is the error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 73, in run
    loop(self)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 166, in __call__
    snapshot = self.snapshots[path]
KeyError: '/Users/andy/files/folder_to_sync/some_sub_folder_that_had_change'
jachin commented 10 years ago

Someone else had this same issue. I'm going to raise the priority of this. I think the best way to "fix" this problem is to check for case differences and then just show a good error message.

jachin commented 10 years ago

At last, I'm fixing bugs. This one should have been fixed in. 7a9ad0d17f58decfa010f7f90b7c0761ccdf53a2

The new version should be ready for download.