Bug 1319088 - FormData should not add extra '/' in the Blob path, r=smaug

This commit is contained in:
Andrea Marchesini
2016-12-01 08:59:36 +01:00
parent e9eb01bb25
commit aa03921b56
3 changed files with 68 additions and 12 deletions

View File

@@ -360,18 +360,7 @@ class HTMLInputElementState final : public nsISupports
if (aArray[i].IsFile()) {
BlobImplOrDirectoryPath* data = mBlobImplsOrDirectoryPaths.AppendElement();
RefPtr<File> file = aArray[i].GetAsFile();
nsAutoString name;
file->GetName(name);
nsAutoString path;
path.AssignLiteral(FILESYSTEM_DOM_PATH_SEPARATOR_LITERAL);
path.Append(name);
file->SetPath(path);
data->mBlobImpl = file->Impl();
data->mBlobImpl = aArray[i].GetAsFile()->Impl();
data->mType = BlobImplOrDirectoryPath::eBlobImpl;
} else {
MOZ_ASSERT(aArray[i].IsDirectory());