Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for directories treated as files regression in last commit.

  • Loading branch information...
commit ed7ccce58dd920279dbf417f8ae676d44be93379 1 parent 5344eee
@blueimp authored
Showing with 12 additions and 10 deletions.
  1. +12 −10 js/jquery.fileupload.js
View
22 js/jquery.fileupload.js
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload Plugin 5.17.4
+ * jQuery File Upload Plugin 5.17.5
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -803,15 +803,17 @@
},
dirReader;
path = path || '';
- if (entry._file) {
- // Workaround for Chrome bug #149735
- entry._file.relativePath = path;
- dfd.resolve(entry._file);
- } else if (entry.isFile) {
- entry.file(function (file) {
- file.relativePath = path;
- dfd.resolve(file);
- }, errorHandler);
+ if (entry.isFile) {
+ if (entry._file) {
+ // Workaround for Chrome bug #149735
+ entry._file.relativePath = path;
+ dfd.resolve(entry._file);
+ } else {
+ entry.file(function (file) {
+ file.relativePath = path;
+ dfd.resolve(file);
+ }, errorHandler);
+ }
} else if (entry.isDirectory) {
dirReader = entry.createReader();
dirReader.readEntries(function (entries) {
Please sign in to comment.
Something went wrong with that request. Please try again.