Skip to content

Commit ed7ccce

Browse files
committed
Fix for directories treated as files regression in last commit.
1 parent 5344eee commit ed7ccce

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

js/jquery.fileupload.js

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin 5.17.4
2+
* jQuery File Upload Plugin 5.17.5
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -803,15 +803,17 @@
803803
},
804804
dirReader;
805805
path = path || '';
806-
if (entry._file) {
807-
// Workaround for Chrome bug #149735
808-
entry._file.relativePath = path;
809-
dfd.resolve(entry._file);
810-
} else if (entry.isFile) {
811-
entry.file(function (file) {
812-
file.relativePath = path;
813-
dfd.resolve(file);
814-
}, errorHandler);
806+
if (entry.isFile) {
807+
if (entry._file) {
808+
// Workaround for Chrome bug #149735
809+
entry._file.relativePath = path;
810+
dfd.resolve(entry._file);
811+
} else {
812+
entry.file(function (file) {
813+
file.relativePath = path;
814+
dfd.resolve(file);
815+
}, errorHandler);
816+
}
815817
} else if (entry.isDirectory) {
816818
dirReader = entry.createReader();
817819
dirReader.readEntries(function (entries) {

0 commit comments

Comments
 (0)