From c56458c9ee6c813e46d08f17dd348de924b0e05d Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 19 May 2022 18:35:10 +0200 Subject: [PATCH] Update 00-folders.sh --- resiliosync/rootfs/etc/cont-init.d/00-folders.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh index d19796636..cbd8922fc 100644 --- a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh +++ b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh @@ -49,7 +49,7 @@ change_folders () { chown -R "$PUID":"$PGID" "$CONFIGLOCATION" # Transfer files - if [ -d "$ORIGINALLOCATION" ] && [ "$(ls -A $ORIGINALLOCATION)" ]; then + if [ -d "$ORIGINALLOCATION" ] && [ "$(ls -A $ORIGINALLOCATION 2>/dev/null)" ]; then echo "Files were existing in $ORIGINALLOCATION, they will be moved to $CONFIGLOCATION" mv "$ORIGINALLOCATION"/* "$CONFIGLOCATION"/ rmdir "$ORIGINALLOCATION"