summaryrefslogtreecommitdiffstats
path: root/roseh.moe.go
diff options
context:
space:
mode:
Diffstat (limited to 'roseh.moe.go')
-rw-r--r--roseh.moe.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/roseh.moe.go b/roseh.moe.go
index b1f659e..7b5b953 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -15,6 +15,7 @@ import (
"fmt"
"html/template"
"io"
+ "io/fs"
"log"
"mime/multipart"
"net/http"
@@ -270,7 +271,10 @@ func readHoleFile(w http.ResponseWriter, hole string) error {
primaryKey, encryptionKey := key[:32], key[32:]
f, err := os.Open(fmt.Sprintf("%s/%x", *holeTempDir, primaryKey))
if err != nil {
- return errNoHole
+ if errors.Is(err, fs.ErrNotExist) {
+ return errNoHole
+ }
+ return err
}
defer f.Close()
r := oae2.NewReader(f, encryptionKey, blockSize)