Index: Source/core/html/forms/FileInputType.cpp |
diff --git a/Source/core/html/forms/FileInputType.cpp b/Source/core/html/forms/FileInputType.cpp |
index e26e55da239b8c0b749554b755b74ad80afc1be9..342cc44006a2a48b553df8b5ea4c014d2a6f5ef1 100644 |
--- a/Source/core/html/forms/FileInputType.cpp |
+++ b/Source/core/html/forms/FileInputType.cpp |
@@ -333,10 +333,21 @@ void FileInputType::receiveDropForDirectoryUpload(const Vector<String>& paths) |
} |
} |
+void FileInputType::getAcceptableDropFileNames(const DragData& dragData, Vector<String>* result) |
+{ |
+ result->clear(); |
+ Vector<String> paths; |
+ dragData.asFilenames(paths); |
+ for (const String path : paths) { |
+ if (!path.isEmpty()) |
+ result->append(path); |
+ } |
+} |
+ |
bool FileInputType::receiveDroppedFiles(const DragData* dragData) |
{ |
Vector<String> paths; |
- dragData->asFilenames(paths); |
+ FileInputType::getAcceptableDropFileNames(*dragData, &paths); |
if (paths.isEmpty()) |
return false; |