mirror of
https://github.com/netinvent/npbackup.git
synced 2025-12-11 22:25:57 +08:00
Fix '/' cannot be backed up because we remove trailing slashes
This commit is contained in:
parent
8a7a1b5411
commit
a65d5a53c7
1 changed files with 4 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ __intname__ = "npbackup.restic_wrapper"
|
|||
__author__ = "Orsiris de Jong"
|
||||
__copyright__ = "Copyright (C) 2022-2023 NetInvent"
|
||||
__license__ = "GPL-3.0-only"
|
||||
__build__ = "2023082801"
|
||||
__version__ = "1.7.2"
|
||||
__build__ = "2023112901"
|
||||
__version__ = "1.7.3"
|
||||
|
||||
|
||||
from typing import Tuple, List, Optional, Callable, Union
|
||||
|
|
@ -560,9 +560,9 @@ class ResticRunner:
|
|||
for path in paths:
|
||||
cmd += ' {} "{}"'.format(source_parameter, path)
|
||||
else:
|
||||
# make sure path is a list and does not have trailing slashes
|
||||
# make sure path is a list and does not have trailing slashes, unless we're backing up root
|
||||
cmd = "backup {}".format(
|
||||
" ".join(['"{}"'.format(path.rstrip("/\\")) for path in paths])
|
||||
" ".join(['"{}"'.format(path.rstrip("/\\")) if path != '/' else path for path in paths])
|
||||
)
|
||||
|
||||
case_ignore_param = ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue