Title: [217977] trunk/Source/WebCore
Revision
217977
Author
[email protected]
Date
2017-06-09 04:00:12 -0700 (Fri, 09 Jun 2017)

Log Message

[cURL] Remove a call to Windows API
https://bugs.webkit.org/show_bug.cgi?id=172079

Patch by Daewoong Jang <[email protected]> on 2017-06-09
Reviewed by Yusuke Suzuki.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::moveFileToDestination):
* platform/win/FileSystemWin.cpp:
(WebCore::moveFile):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (217976 => 217977)


--- trunk/Source/WebCore/ChangeLog	2017-06-09 10:52:21 UTC (rev 217976)
+++ trunk/Source/WebCore/ChangeLog	2017-06-09 11:00:12 UTC (rev 217977)
@@ -1,3 +1,15 @@
+2017-06-09  Daewoong Jang  <[email protected]>
+
+        [cURL] Remove a call to Windows API
+        https://bugs.webkit.org/show_bug.cgi?id=172079
+
+        Reviewed by Yusuke Suzuki.
+
+        * platform/network/curl/CurlDownload.cpp:
+        (WebCore::CurlDownload::moveFileToDestination):
+        * platform/win/FileSystemWin.cpp:
+        (WebCore::moveFile):
+
 2017-06-09  Miguel Gomez  <[email protected]>
 
         [GTK][WPE] Fix alpha premultiplying when using cairo to draw the video frames

Modified: trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp (217976 => 217977)


--- trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp	2017-06-09 10:52:21 UTC (rev 217976)
+++ trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp	2017-06-09 11:00:12 UTC (rev 217977)
@@ -340,7 +340,7 @@
     if (m_destination.isEmpty())
         return;
 
-    ::MoveFileEx(m_tempPath.charactersWithNullTermination().data(), m_destination.charactersWithNullTermination().data(), MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING);
+    moveFile(m_tempPath, m_destination);
 }
 
 void CurlDownload::writeDataToFile(const char* data, int size)

Modified: trunk/Source/WebCore/platform/win/FileSystemWin.cpp (217976 => 217977)


--- trunk/Source/WebCore/platform/win/FileSystemWin.cpp	2017-06-09 10:52:21 UTC (rev 217976)
+++ trunk/Source/WebCore/platform/win/FileSystemWin.cpp	2017-06-09 11:00:12 UTC (rev 217977)
@@ -177,6 +177,13 @@
     return !!RemoveDirectoryW(filename.charactersWithNullTermination().data());
 }
 
+bool moveFile(const String& oldPath, const String& newPath)
+{
+    String oldFilename = oldPath;
+    String newFilename = newPath;
+    return !!::MoveFileEx(oldFilename.charactersWithNullTermination().data(), newFilename.charactersWithNullTermination().data(), MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING);
+}
+
 String pathByAppendingComponent(const String& path, const String& component)
 {
     Vector<UChar> buffer(MAX_PATH);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to