summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2015-08-02 16:13:58 +0300
committerFrank LENORMAND <lenormf@gmail.com>2015-08-02 16:13:58 +0300
commitb4e1d711d6588a592f89388d2aa9cd34cc6fce0f (patch)
tree8fa1e21f16477b2e16fc3ed034afd99652376e9c
parentb5444883e9f065321178382ff6dcf6f75af3ea0f (diff)
Fix the pattern used in the backups lookup onliner to avoid false positives
-rw-r--r--rc/autorestore.kak2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc/autorestore.kak b/rc/autorestore.kak
index e66a3793..f505044a 100644
--- a/rc/autorestore.kak
+++ b/rc/autorestore.kak
@@ -7,7 +7,7 @@ def -hidden _autorestore-restore-buffer %{
buffer_dirname=$(dirname "${kak_bufname}")
## Find the name of the latest backup created for the buffer that was open
- latest_backup_path=$(find "${buffer_dirname}" -maxdepth 1 -type f -readable -name ".${buffer_basename}.kak.*" -printf '%A@/%p\n' 2>/dev/null \
+ latest_backup_path=$(find "${buffer_dirname}" -maxdepth 1 -type f -readable -name "\.${buffer_basename}\.kak\.*" -printf '%A@/%p\n' 2>/dev/null \
| sort -n -t. -k1 | sed -nr 's/^.+\///;$p')
test ! -z "${latest_backup_path}" || exit