From d06b204fb035cc77c944ce339413bfb4809d4e03 Mon Sep 17 00:00:00 2001 From: nek0 Date: Thu, 9 Mar 2017 22:56:37 +0100 Subject: [PATCH] fix --- Handler/Commons.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Handler/Commons.hs b/Handler/Commons.hs index 59ce7cd..41f3cc4 100755 --- a/Handler/Commons.hs +++ b/Handler/Commons.hs @@ -211,8 +211,10 @@ handleUpload len albumId prefix time owner desc tags licence spec (index, file) case spec of NewFile -> insertMedium medium albumId - Replace _ -> - return () + Replace mId -> + runDB $ update mId + [ MediumPath =. ('/' : path) + ] return Nothing else do liftIO $ removeFile (FP.normalise path)