瀏覽代碼

Fix string checks in schedule

`s` comes through as a `PosixPath`, so both the `' ' in s` & return value, later
used by `join`, complain.
mAAdhaTTah 5 年之前
父節點
當前提交
be7a7f8548
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      archivebox/main.py

+ 1 - 1
archivebox/main.py

@@ -938,7 +938,7 @@ def schedule(add: bool=False,
 
 
     if every or add:
     if every or add:
         every = every or 'day'
         every = every or 'day'
-        quoted = lambda s: f'"{s}"' if s and ' ' in s else s
+        quoted = lambda s: f'"{s}"' if s and ' ' in str(s) else str(s)
         cmd = [
         cmd = [
             'cd',
             'cd',
             quoted(out_dir),
             quoted(out_dir),