diff --git a/README.txt b/README.txt index b7596975..8537dc8a 100644 --- a/README.txt +++ b/README.txt @@ -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. 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. You can also publish Wiki help description. diff --git a/app/helpers/dmsf_zip.rb b/app/helpers/dmsf_zip.rb index 049386c2..f238090b 100644 --- a/app/helpers/dmsf_zip.rb +++ b/app/helpers/dmsf_zip.rb @@ -40,7 +40,9 @@ class DmsfZip end 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| buffer = "" while (buffer = f.read(8192))