Skip to content
Snippets Groups Projects
Commit bb3cc0fc authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

[borg] remove unnecessary proxy variable

parent bd4c3be7
Branches
Tags
No related merge requests found
......@@ -133,23 +133,20 @@ do_borg_local_dir() {
fi
echo "Testing to see if the borg backup directory exists and is writable"
test -d $borg_directory
if [ $? = 0 ]; then
test -w $borg_directory
if [ $? != 0 ]; then
if [ test -d "$borg_directory" ]; then
if [ test -w "$borg_directory" ]; then
msgBox "destination directory is not writable!" "The destination directory is not writable by the user you specified. Please fix the permissions on the directory and then try again."
dir_status=failed
fi
else
booleanBox "Destination does not exist" "The destination backup directory does not exist, do you want me to create it for you?"
if [ $? = 0 ]; then
mkdir -p $borg_directory
result=$?
case $result in
0) msgBox "$borg_title: success" "Creation of the destination directory was a success!";;
1) msgBox "$borg_title: error" "Creation of the destination directory failed, check the directory permissions."
dir_status=failed;;
esac
if mkdir -p "$borg_directory"; then
msgBox "$borg_title: success" "Creation of the destination directory was a success!"
else
msgBox "$borg_title: error" "Creation of the destination directory failed, check the directory permissions."
dir_status=failed
fi
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment