]> source.dussan.org Git - redmine.git/commitdiff
add more error message if public/plugin_assets cannot be created (#11945)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Sep 2012 04:11:14 +0000 (04:11 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Sep 2012 04:11:14 +0000 (04:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10472 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/plugin.rb

index 971f48f4ea5c27e7c8aed9f1b01f1b4bc82d9da0..0b7a4f6e5ea5122283db18e22340e4e9110a5cad 100644 (file)
@@ -336,7 +336,11 @@ module Redmine #:nodoc:
 
       unless source_files.empty?
         base_target_dir = File.join(destination, File.dirname(source_files.first).gsub(source, ''))
-        FileUtils.mkdir_p(base_target_dir)
+        begin
+          FileUtils.mkdir_p(base_target_dir)
+        rescue Exception => e
+          raise "Could not create directory #{base_target_dir}: " + e.message
+        end
       end
 
       source_dirs.each do |dir|