Skip to content

Commit 9f2da9f

Browse files
Added ignore to ignore directories when their metadata changes. (#25)
* Added ignore to ignore directories when their metadata changes. * code review --------- Co-authored-by: Falko Schindler <falko@zauberzeug.com>
1 parent 202adea commit 9f2da9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

livesync/folder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def _get_ignores(self) -> List[str]:
5555
path = self.source_path / '.syncignore'
5656
if not path.is_file():
5757
path.write_text('\n'.join(self.DEFAULT_IGNORES))
58-
return [line.strip() for line in path.read_text().splitlines() if not line.startswith('#')]
58+
ignores = [line.strip() for line in path.read_text().splitlines() if not line.startswith('#')]
59+
ignores += [ignore.rstrip('/\\') for ignore in ignores if ignore.endswith('/') or ignore.endswith('\\')]
60+
return ignores
5961

6062
def get_summary(self) -> str:
6163
summary = f'{self.source_path} --> {self.target}\n'

0 commit comments

Comments
 (0)