From 8ef71ea31ba4191584b59094e9f779c73426636b Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 26 May 2013 15:08:38 -0400 Subject: [PATCH] don't show a notice about updating an existing file if we didn't do that (new-upload vs new-over-existing-upload) --- src/blarg/routes/files.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blarg/routes/files.clj b/src/blarg/routes/files.clj index b93b56d..ef7b222 100644 --- a/src/blarg/routes/files.clj +++ b/src/blarg/routes/files.clj @@ -35,7 +35,7 @@ (files/add-file path filename tempfile content-type))] (do (session/flash-put! :file-success (str "" (:id savedfile) " was uploaded successfully.")) - (session/flash-put! :file-notice "Existing file with the same name was updated with the uploaded file.")) + (if exists? (session/flash-put! :file-notice "Existing file with the same name was updated with the uploaded file."))) (session/flash-put! :file-error "File could not be uploaded."))) (session/flash-put! :file-error "No file selected to upload.")) (resp/redirect (str "/listfiles" path)))