mirror of https://github.com/vitalif/grive2
Escape folder when calling sync from change listener
The old version would pass in an unescaped directory, which then got unescaped by the sync call. In some cases it worked but resulted in foldername wold not matched reality (example: google-drive -> google/drive) and error out when checking if that folder exists.pull/244/head
parent
cf51167b55
commit
e3e18fe16a
|
@ -107,7 +107,7 @@ listen_directory() {
|
|||
while true #run indefinitely
|
||||
do
|
||||
# Use a different call to not need to change exit into return
|
||||
inotifywait -q -r -e modify,attrib,close_write,move,create,delete --exclude ".grive_state|.grive" "${_directory}" > /dev/null 2>&1 && ${SCRIPT} sync "${_directory}"
|
||||
inotifywait -q -r -e modify,attrib,close_write,move,create,delete --exclude ".grive_state|.grive" "${_directory}" > /dev/null 2>&1 && ${SCRIPT} sync $(systemd-escape "${_directory}")
|
||||
#echo ${SCRIPT} "${_directory}"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue