* fix in Zipping files

git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@84 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
vit.jonas@gmail.com 2011-05-25 08:49:40 +00:00
parent e610f5ba24
commit 3bc82a61cf
2 changed files with 4 additions and 2 deletions

View File

@ -89,7 +89,7 @@ There is possibility to link DMSF files from Wiki entries:
DMSF file id can be found in link for file download. DMSF file id can be found in link for file download.
There is possibility to link DMSF folders from Wiki entries: There is possibility to link DMSF folders from Wiki entries:
{{dmsff(17)}} link to folder with id 5 {{dmsff(5)}} link to folder with id 5
DMSF folder id can be found in link for folder opening. DMSF folder id can be found in link for folder opening.
You can also publish Wiki help description. You can also publish Wiki help description.

View File

@ -40,7 +40,9 @@ class DmsfZip
end end
def add_file(file) def add_file(file)
@zip_file.put_next_entry(file.dmsf_path_str) string_path = file.folder.nil? ? "" : file.folder.dmsf_path_str + "/"
string_path += file.name
@zip_file.put_next_entry(string_path)
File.open(file.last_revision.disk_file, "rb") do |f| File.open(file.last_revision.disk_file, "rb") do |f|
buffer = "" buffer = ""
while (buffer = f.read(8192)) while (buffer = f.read(8192))