1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-15 04:03:41 +01:00

Fix for path strip on '/' backups

This commit is contained in:
deajan 2018-07-30 16:28:12 +02:00
parent c525b449f9
commit e47e179169

View File

@ -1462,10 +1462,10 @@ function FilesBackup {
if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then
# Fix for backup of '/' # Fix for backup of '/'
if [ "${backupTask#/}" == "/" ]; then if [ "${backupTask#/}/" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}" destinationDir="$FILE_STORAGE/${backupTask#/}/"
else else
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}") destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}/")
fi fi
else else
destinationDir="$FILE_STORAGE" destinationDir="$FILE_STORAGE"
@ -1497,10 +1497,10 @@ function FilesBackup {
if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then
# Fix for backup of '/' # Fix for backup of '/'
if [ "${backupTask#/}" == "/" ]; then if [ "${backupTask#/}/" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}" destinationDir="$FILE_STORAGE/${backupTask#/}/"
else else
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}") destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}/")
fi fi
encryptDir="$FILE_STORAGE/${backupTask#/}" encryptDir="$FILE_STORAGE/${backupTask#/}"
else else
@ -1533,10 +1533,10 @@ function FilesBackup {
if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then
# Fix for backup of '/' # Fix for backup of '/'
if [ "${backupTask#/}" == "/" ]; then if [ "${backupTask#/}/" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}" destinationDir="$FILE_STORAGE/${backupTask#/}/"
else else
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}") destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}/")
fi fi
else else
destinationDir="$FILE_STORAGE" destinationDir="$FILE_STORAGE"