소스 검색

Merge pull request #7507 from ThomasWaldmann/ignore-empty-path-master

create: ignore empty paths, print warning, fixes #5637
TW 2 년 전
부모
커밋
b8337b6f77
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/borg/archiver/create_cmd.py

+ 3 - 0
src/borg/archiver/create_cmd.py

@@ -132,6 +132,9 @@ class CreateMixIn:
                         return self.exit_code
             else:
                 for path in args.paths:
+                    if path == "":  # issue #5637
+                        self.print_warning("An empty string was given as PATH, ignoring.")
+                        continue
                     if path == "-":  # stdin
                         path = args.stdin_name
                         mode = args.stdin_mode