From 4602f06a0041ab34b3f55f6e7d7faa747321b549 Mon Sep 17 00:00:00 2001 From: Stian Haklev Date: Thu, 10 May 2007 16:40:45 +0700 Subject: [PATCH] commented out debug print statements --- app/controllers/file_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/file_controller.rb b/app/controllers/file_controller.rb index 2051178..c545a6f 100644 --- a/app/controllers/file_controller.rb +++ b/app/controllers/file_controller.rb @@ -108,7 +108,7 @@ class FileController < ApplicationController # extract one entry to a file in uploads/ File.open("#{TEMP_PATH}/#{date_time_created.to_f}.tmp", 'wb') { |f| f.write(zf.file.open(entry.name).read) } - p "process #{name} #{date_time_created.to_f}" + #p "process #{name} #{date_time_created.to_f}" process_each_file(name, date_time_created, name, filesize) end @@ -117,7 +117,7 @@ class FileController < ApplicationController # let's get the directories and make them first dirs, files = [], [] zf.each_with_index do |entry, i| - p "entry name #{entry.name} ftype #{entry.ftype}" + #p "entry name #{entry.name} ftype #{entry.ftype}" dirs << entry.name if entry.ftype == :directory files << entry if entry.ftype == :file end @@ -139,7 +139,7 @@ class FileController < ApplicationController level, parent, dirs_created = 1, [], {} parent[level], old = @folder, @folder - p dirs + #p dirs # create new directories necessary dirs.sort.each do |dir| newlevel = dir.scan("/").length @@ -167,8 +167,8 @@ class FileController < ApplicationController File.open("#{TEMP_PATH}/#{date_time_created.to_f}.tmp", 'wb') do |f| f.write(zf.file.open(file.name).read) end - p dirs_created - p dirname + #p dirs_created + #p dirname dir = ( (dirname =~ /^\.$|^$/) ? @folder : dirs_created[dirname + "/"] ) dir = @folder if dir.nil? process_each_file( name, date_time_created, name, filesize, dir.id ) -- 2.11.4.GIT