فهرست منبع

null check fsPath on unlink file

Henry Oswald 10 سال پیش
والد
کامیت
e0f39da616
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      services/filestore/app/coffee/LocalFileWriter.coffee

+ 2 - 0
services/filestore/app/coffee/LocalFileWriter.coffee

@@ -27,6 +27,8 @@ module.exports =
 		stream.pipe writeStream
 		stream.pipe writeStream
 
 
 	deleteFile: (fsPath, callback)->
 	deleteFile: (fsPath, callback)->
+		if !fsPath? or fsPath == ""
+			return callback()
 		logger.log fsPath:fsPath, "removing local temp file"
 		logger.log fsPath:fsPath, "removing local temp file"
 		fs.unlink fsPath, callback
 		fs.unlink fsPath, callback