Brian Gough 9 лет назад
Родитель
Сommit
4c78b5770c
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      services/web/app/coffee/Features/Uploads/ArchiveManager.coffee

+ 2 - 1
services/web/app/coffee/Features/Uploads/ArchiveManager.coffee

@@ -39,7 +39,8 @@ module.exports = ArchiveManager =
 
 	_checkFilePath: (entry, destination, callback = (err, destFile) ->) ->
 		# check if the entry is a directory
-		if /\/$/.test(entry.fileName)
+		endsWithSlash = /\/$/
+		if endsWithSlash.test(entry.fileName)
 			return callback() # don't give a destfile for directory
 		# check that the file does not use a relative path
 		for dir in entry.fileName.split('/')