mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-04 16:03:09 +00:00
use regex for directory check
This commit is contained in:
parent
2bb7c6d4c6
commit
4c78b5770c
1 changed files with 2 additions and 1 deletions
|
@ -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('/')
|
||||
|
|
Loading…
Reference in a new issue