oswatcher icon indicating copy to clipboard operation
oswatcher copied to clipboard

GitFilesystemHook: handle apostrophe in filename

Open Wenzel opened this issue 5 years ago • 0 comments

When commiting a file with an apostrophe as part of the filename, git ls-files will return it as an escaped character:

Capture d’écran de 2020-02-06 00-19-58

This breaks our GitFilesystemHook when a guest filepath already exists on the git, and should be removed from the self.to_remove_tree dict: https://github.com/Wenzel/oswatcher/blob/de3d47380f927ded4ccfed3625aec750321a7986/hooks/filesystem.py#L372

For the moment we simply ignore these files, by detecting when a filepath returns by git ls-files startswith an apostrophe: https://github.com/Wenzel/oswatcher/blob/de3d47380f927ded4ccfed3625aec750321a7986/hooks/filesystem.py#L329

Wenzel avatar Feb 05 '20 23:02 Wenzel