Skip to content

Commit

Permalink
Merge pull request vitalif#244 from jankatins/fix_unescaped_folder_name
Browse files Browse the repository at this point in the history
Escape folder when calling sync from change listener
  • Loading branch information
vitalif committed Feb 24, 2019
2 parents 00d5148 + f9cad3b commit 294b1b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ Prepare a Google Drive folder in your $HOME directory with `grive -a`.

```bash
# 'google-drive' is the name of your Google Drive folder in your $HOME directory
systemctl --user enable grive-timer@google-drive.timer
systemctl --user start grive-timer@google-drive.timer
systemctl --user enable grive-changes@google-drive.service
systemctl --user start grive-changes@google-drive.service
systemctl --user enable grive-timer@$(systemd-escape google-drive).timer
systemctl --user start grive-timer@$(systemd-escape google-drive).timer
systemctl --user enable grive-changes@$(systemd-escape google-drive).service
systemctl --user start grive-changes@$(systemd-escape google-drive).service
```

You can enable and start these two units for multiple folders in your `$HOME`
Expand Down
2 changes: 1 addition & 1 deletion systemd/grive-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 294b1b1

Please sign in to comment.