Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
keeleliin
keeleliin-wrapper
Commits
77eb9b6d
Commit
77eb9b6d
authored
Dec 01, 2015
by
priit
Browse files
Arhiivi lahtipakkija vigase väljundi parandus
parent
be9fc8eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
wrapper/archiveExtractor.js
View file @
77eb9b6d
...
...
@@ -21,8 +21,6 @@ function ArchiveExtractor() {
this
.
process
=
function
(
session
,
callback
)
{
var
zipFile
=
session
.
requestFiles
.
content
;
var
read
=
fs
.
readFileSync
(
zipFile
);
var
zip
=
isZip
(
read
);
var
gzip
=
isTar
(
read
);
if
(
isZip
(
read
))
{
return
self
.
_extractZipFile
(
zipFile
,
session
,
callback
);
...
...
@@ -64,7 +62,7 @@ function ArchiveExtractor() {
var
savePath
=
SessionService
.
getStorePath
(
session
.
id
);
var
fullpath
=
path
.
join
(
savePath
,
entry
.
path
);
logger
.
debug
(
'
Fullpath:
'
+
fullpath
);
var
directory
=
(
isFile
?
path
.
dirname
(
fullpath
)
:
fullpath
)
;
var
directory
=
isFile
?
path
.
dirname
(
fullpath
)
:
fullpath
;
logger
.
debug
(
'
Countx:
'
+
count
);
...
...
@@ -92,7 +90,7 @@ function ArchiveExtractor() {
checkForCallback
();
});
}
else
{
logger
.
debug
(
'
Not file and not text or binary on count:
'
+
count
);
logger
.
debug
(
'
Not file and not text or binary on count:
'
+
count
+
'
isFile:
'
+
isFile
+
'
isTextOrBinary:
'
+
isTextOrBinary
.
isTextSync
(
entry
.
path
)
);
count
=
count
-
1
;
checkForCallback
();
entry
.
autodrain
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment