From 289308ccf3dd6dde68d4213c60c721914c6d746d Mon Sep 17 00:00:00 2001 From: Avril Date: Tue, 7 Jul 2020 21:32:03 +0100 Subject: [PATCH] fix match autosaves --- emacs-cleaner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs-cleaner.go b/emacs-cleaner.go index b64b14b..56d7562 100644 --- a/emacs-cleaner.go +++ b/emacs-cleaner.go @@ -40,8 +40,8 @@ func walk(rpath string, lock *semaphore.Semaphore, output chan string, wait *syn } var work_re *regexp.Regexp = regexp.MustCompile(`~$`) -var as_re *regexp.Regexp = regexp.MustCompile(`^\.#(.*)$`) -var as_re2 *regexp.Regexp = regexp.MustCompile(`^#(.*)#$`) +var as_re *regexp.Regexp = regexp.MustCompile(`(^|/)\.#(.*)$`) +var as_re2 *regexp.Regexp = regexp.MustCompile(`(^|/)#(.*)#$`) func file_exists(file string) bool { if s, err:= os.Stat(file); err == nil {