From 9442cd6517e063c0653e14f2cafc82093688af4f Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Fri, 8 Nov 2024 13:25:30 +0100 Subject: [PATCH] filesystem: allow @ in file names It's apparently common in files from Google calendar. The whole regex probably needs to be reconsidered, but for now just make this work and keep it simple. --- storage/filesystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/filesystem.go b/storage/filesystem.go index 301c8f7..f289ff5 100644 --- a/storage/filesystem.go +++ b/storage/filesystem.go @@ -29,7 +29,7 @@ type filesystemBackend struct { } var ( - validFilenameRegex = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]+(.[a-zA-Z]+)?$`) + validFilenameRegex = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9@_-]+(.[a-zA-Z]+)?$`) defaultResourceName = "default" )