]> git.ipfire.org Git - people/stevee/network.git/commitdiff
copy: Make function handle paths with spaces
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Jul 2017 17:11:08 +0000 (19:11 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Jul 2017 17:11:08 +0000 (19:11 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.util

index 8c8f569179db086088273de0b6631a9a233b33d0..3f943e8d13e73111b01281aa7a0109816a376729 100644 (file)
@@ -761,7 +761,7 @@ copy() {
        local dst=${2}
 
        # Check if ${dst} is a directory
-       if [ -d ${dst} ]; then
+       if [ -d "${dst}" ]; then
                log ERROR "${dst} is a directory."
                return ${EXIT_ERROR}
        fi