[Title] Fixed not to transfer "log" file when there does not exist
authordonghee yang <donghee.yang@samsung.com>
Tue, 16 Oct 2012 10:37:54 +0000 (19:37 +0900)
committerdonghee yang <donghee.yang@samsung.com>
Tue, 16 Oct 2012 10:37:54 +0000 (19:37 +0900)
src/build_server/SocketJobRequestListener.rb

index 18d3be3fdc3bcc75b072e52ac582c26e5246aa1a..23fb2ccc60e9cf849a853fcf8199351ecf290e88 100644 (file)
@@ -764,7 +764,7 @@ class SocketJobRequestListener
                @log.info "Sending requested file...: #{file_name}"
                @comm_server.send_file(req, "#{outgoing_dir}/#{file_name}")
                # remove file if "dock" defined
-               if dock_num != "0" then
+               if dock_num != "0" and File.exist? "#{outgoing_dir}/#{file_name}" then
                        @log.info "Removing requested file...: #{file_name}"
                        FileUtils.rm_rf "#{outgoing_dir}/#{file_name}"
                        if Utils.directory_emtpy?(outgoing_dir) then