1
0
mirror of https://github.com/deajan/obackup.git synced 2024-12-24 14:33: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
# Fix for backup of '/'
if [ "${backupTask#/}" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}"
if [ "${backupTask#/}/" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}/"
else
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}")
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}/")
fi
else
destinationDir="$FILE_STORAGE"
@ -1497,10 +1497,10 @@ function FilesBackup {
if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then
# Fix for backup of '/'
if [ "${backupTask#/}" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}"
if [ "${backupTask#/}/" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}/"
else
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}")
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}/")
fi
encryptDir="$FILE_STORAGE/${backupTask#/}"
else
@ -1533,10 +1533,10 @@ function FilesBackup {
if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then
# Fix for backup of '/'
if [ "${backupTask#/}" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}"
if [ "${backupTask#/}/" == "/" ]; then
destinationDir="$FILE_STORAGE/${backupTask#/}/"
else
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}")
destinationDir=$(dirname "$FILE_STORAGE/${backupTask#/}/")
fi
else
destinationDir="$FILE_STORAGE"