浏览代码

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