We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e20aef8 commit ee32c22Copy full SHA for ee32c22
Win32.xs
@@ -1928,6 +1928,12 @@ XS(w32_HttpGetFile)
1928
if (bAborted)
1929
error = GetLastError();
1930
1931
+ /* If we successfully opened the output file but failed later, mark
1932
+ * the file for deletion.
1933
+ */
1934
+ if (bAborted && hOut != INVALID_HANDLE_VALUE)
1935
+ (void) DeleteFileW(file);
1936
+
1937
/* Close any open handles. */
1938
if (hOut) CloseHandle(hOut);
1939
if (hRequest) WinHttpCloseHandle(hRequest);
0 commit comments