From f4e54880faf42bcec84fa313d5765c92864133ee Mon Sep 17 00:00:00 2001 From: fsantini Date: Wed, 24 Apr 2019 18:17:23 +0200 Subject: [PATCH] Google Drive bugfix --- src/usr/local/kobocloud/getGDriveFiles.sh | 2 +- src/usr/local/kobocloud/getRemoteFile.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/local/kobocloud/getGDriveFiles.sh b/src/usr/local/kobocloud/getGDriveFiles.sh index 3b5ff04..a4615c3 100755 --- a/src/usr/local/kobocloud/getGDriveFiles.sh +++ b/src/usr/local/kobocloud/getGDriveFiles.sh @@ -19,7 +19,7 @@ grep -Eo "\\\x5b\\\x22[^\\\]*\\\x22,\\\x5b\\\x22$gDirCode\\\x22\\\x5d\\\n,\\\x22 while read fileInfo do echo $fileInfo - fileCode=`echo $fileInfo | sed -n 's/x5bx22\([a-zA-Z0-9]*\)x22,.*/\1/p'` # extract the code for file download (this is how a file is identified in GDrive) + fileCode=`echo $fileInfo | sed -n 's/x5bx22\([^\\\]*\)x22,.*/\1/p'` # extract the code for file download (this is how a file is identified in GDrive) fileName=`echo $fileInfo | sed -n 's/.*x22\(.*\)$/\1/p'` # extract the file name echo $fileCode echo $fileName diff --git a/src/usr/local/kobocloud/getRemoteFile.sh b/src/usr/local/kobocloud/getRemoteFile.sh index dc0a816..2ce8609 100755 --- a/src/usr/local/kobocloud/getRemoteFile.sh +++ b/src/usr/local/kobocloud/getRemoteFile.sh @@ -26,7 +26,7 @@ else localSize=0 fi if [ "$remoteSize" = "" ]; then - remoteSize=0 + remoteSize=1 fi if [ $localSize -ge $remoteSize ]; then echo "File exists: skipping"