From 5e232a00384b40cfa1def1ed88601cc68764158d Mon Sep 17 00:00:00 2001 From: "vit.jonas@gmail.com" Date: Thu, 21 Jul 2011 20:43:54 +0000 Subject: [PATCH] * fixed Issue 119: Critical-dmsf crash when trying upload a file with empty title git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@207 5e329b0b-a2ee-ea63-e329-299493fc886d --- app/controllers/dmsf_upload_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index 32732e23..8dfb2077 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -122,7 +122,7 @@ class DmsfUploadController < ApplicationController # Need to save file first to generate id for it in case of creation. # File id is needed to properly generate revision disk filename - if file.save + if new_revision.valid? && file.save new_revision.disk_filename = new_revision.new_storage_filename else failed_uploads.push(commited_file)