Skip to content

Commit

Permalink
Ignore dotfiles as created by Spotlight on the Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
janten committed Apr 6, 2020
1 parent a2ec988 commit 81c68e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dptrp1/dptrp1.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ def traverse_local_folder(path):
for entry in os.scandir(path):
if entry.is_dir():
traverse_local_folder(entry.path)
elif entry.name.lower().endswith(".pdf"):
# Only handle PDF files, ignore files starting with a dot.
elif entry.name.lower().endswith(".pdf") and not entry.name.startswith("."):
relative_path = Path(entry.path).relative_to(local_folder)
remote_path = normalize_path(
(Path(remote_folder) / relative_path).as_posix()
Expand Down

0 comments on commit 81c68e9

Please sign in to comment.