OSDN Git Service

fix archive download : not creating namespace directory
authorPierre Gambarotto <pierre.gambarotto@n7.fr>
Thu, 14 Feb 2013 13:29:24 +0000 (14:29 +0100)
committerPierre Gambarotto <pierre.gambarotto@n7.fr>
Thu, 14 Feb 2013 13:29:24 +0000 (14:29 +0100)
app/models/repository.rb

index 37431fe..8bcafba 100644 (file)
@@ -141,7 +141,7 @@ class Repository
 
     # Create file if not exists
     unless File.exists?(file_path)
-      FileUtils.mkdir_p storage_path
+      FileUtils.mkdir_p File.dirname(file_path)
       file = self.repo.archive_to_file(ref, prefix,  file_path)
     end