Fixed issue with paths that contain spaces

This commit is contained in:
Laurent Cozic 2016-10-01 13:44:56 +01:00
parent b9d359f797
commit 56a3a89866
2 changed files with 8 additions and 7 deletions

View file

@ -62,7 +62,8 @@ To display the rsync options that are used for backup, run `./rsync_tmbackup.sh
# TODO # TODO
* Check source and destination file-system. If one of them is FAT, use the --modify-window rsync parameter (see `man rsync`) with a value of 1 or 2. * Check source and destination file-system (`df -T /dest`). If one of them is FAT, use the --modify-window rsync parameter (see `man rsync`) with a value of 1 or 2
* Add `--whole-file` arguments on Windows? See http://superuser.com/a/905415/73619
* Minor changes (see TODO comments in the source). * Minor changes (see TODO comments in the source).

View file

@ -87,27 +87,27 @@ fn_run_cmd() {
} }
fn_find() { fn_find() {
fn_run_cmd "find $1" 2>/dev/null fn_run_cmd "find '$1'" 2>/dev/null
} }
fn_get_absolute_path() { fn_get_absolute_path() {
fn_run_cmd "cd $1;pwd" fn_run_cmd "cd '$1';pwd"
} }
fn_mkdir() { fn_mkdir() {
fn_run_cmd "mkdir -p -- $1" fn_run_cmd "mkdir -p -- '$1'"
} }
fn_rm() { fn_rm() {
fn_run_cmd "rm -rf -- $1" fn_run_cmd "rm -rf -- '$1'"
} }
fn_touch() { fn_touch() {
fn_run_cmd "touch -- $1" fn_run_cmd "touch -- '$1'"
} }
fn_ln() { fn_ln() {
fn_run_cmd "ln -s -- $1 $2" fn_run_cmd "ln -s -- '$1' '$2'"
} }
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------