app/scancab: fix filename regexp for updateLoop

This commit removes two slashes from the filename regexp which prevented
successful matching of files to upload to the scanningcabinet.

I assume that the slashes were just a leftover from the port from Perl.

Change-Id: I6712c9c5464d7ecd748fb352a993afbc759edbec
This commit is contained in:
Fabian Wickborn 2017-07-15 12:53:03 +02:00
parent 92b866d819
commit 6393fc4275
1 changed files with 1 additions and 1 deletions
app/scanningcabinet/scancab

View File

@ -225,7 +225,7 @@ func (a imageNameByTime) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a imageNameByTime) Less(i, j int) bool { return a[i].nanoTime < a[j].nanoTime }
func uploadLoop() {
toUploadPattern := regexp.MustCompile(`/^image-.+-unx(\d+)\.(png|jpg)$/`)
toUploadPattern := regexp.MustCompile(`^image-.+-unx(\d+)\.(png|jpg)$`)
if err := os.Chdir(queueDir); err != nil {
log.Fatalf("Could not chdir to queue directory %v: %v", queueDir, err)
}