Index: Source/modules/filesystem/DOMFilePath.cpp |
diff --git a/Source/modules/filesystem/DOMFilePath.cpp b/Source/modules/filesystem/DOMFilePath.cpp |
old mode 100644 |
new mode 100755 |
index fd5b8077e2dcbbd04697b34c9d110943c6ca885e..0bfa2eee091e21753349f0ae1a67420825915972 |
--- a/Source/modules/filesystem/DOMFilePath.cpp |
+++ b/Source/modules/filesystem/DOMFilePath.cpp |
@@ -33,6 +33,7 @@ |
#include "wtf/Vector.h" |
#include "wtf/text/CString.h" |
+#include "wtf/text/StringBuilder.h" |
namespace WebCore { |
@@ -47,8 +48,7 @@ String DOMFilePath::append(const String& base, const String& components) |
String DOMFilePath::ensureDirectoryPath(const String& path) |
{ |
if (!DOMFilePath::endsWithSeparator(path)) { |
- String newPath = path; |
- newPath.append(DOMFilePath::separator); |
+ String newPath = path + DOMFilePath::separator; |
return newPath; |
abarth-chromium
2014/01/09 15:48:24
I'd just merge these two lines.
|
} |
return path; |
@@ -103,12 +103,12 @@ String DOMFilePath::removeExtraParentReferences(const String& path) |
} |
if (canonicalized.isEmpty()) |
return DOMFilePath::root; |
- String result; |
+ StringBuilder result; |
for (size_t i = 0; i < canonicalized.size(); ++i) { |
result.append(DOMFilePath::separator); |
result.append(canonicalized[i]); |
} |
- return result; |
+ return result.toString(); |
} |
bool DOMFilePath::isValidPath(const String& path) |