Use direct option in vconf backup/restore 09/167309/1
authorJiwoong Im <jiwoong.im@samsung.com>
Mon, 7 Aug 2017 04:42:13 +0000 (13:42 +0900)
committerjusung son <jusung07.son@samsung.com>
Wed, 17 Jan 2018 04:06:59 +0000 (04:06 +0000)
Change-Id: I644005ba315581e5604c27049d02f04640443a85
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
(cherry picked from commit bd30a3f64e66d63032fa7ed66b848a12279b867e)

vconf-compat/vconftool

index 3ba8d33..6826dc0 100755 (executable)
@@ -158,7 +158,9 @@ do_set() {
 do_backup() {
        [ -z "${OPT_KEY}" ] && echo "Invalid key name" && usage
        [ -z "${OPT_VAL}" ] && echo "Invalid directory" && usage
-       [ ! -x ${OPT_VAL} ] && echo "${OPT_VAL} directory not exist" && exit 1
+       [ ! -d ${OPT_VAL} ] && echo "${OPT_VAL} directory not exist" && exit 1
+
+       OPT_DIRECT="-d"
 
        LAYER=`get_layer ${OPT_KEY}`
 
@@ -201,7 +203,9 @@ do_restore() {
        DIR=${OPT_VAL}
        [ -z "${OPT_KEY}" ] && echo "Invalid key name" && usage
        [ -z "${DIR}" ] && echo "Invalid directory" && usage
-       [ ! -x ${DIR} ] && echo "${DIR} directory not exist" && exit 1
+       [ ! -d ${DIR} ] && echo "${DIR} directory not exist" && exit 1
+
+       OPT_DIRECT="-d"
 
        if [ "${OPT_KEY}" == "all" ]
        then