Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14388399
D17800.id42808.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
984 B
Referenced Files
None
Subscribers
None
D17800.id42808.diff
View Options
diff --git a/src/workflow/ArcanistDownloadWorkflow.php b/src/workflow/ArcanistDownloadWorkflow.php
--- a/src/workflow/ArcanistDownloadWorkflow.php
+++ b/src/workflow/ArcanistDownloadWorkflow.php
@@ -83,6 +83,7 @@
$display_name = 'F'.$id;
$is_show = $this->show;
$save_as = $this->saveAs;
+ $path = null;
try {
$file = $conduit->callMethodSynchronous(
@@ -186,7 +187,7 @@
throw new Exception(
pht(
'Got HTTP %d status response, expected HTTP 200.',
- $status));
+ $status->getStatusCode()));
}
if (strlen($data)) {
@@ -232,6 +233,14 @@
return 0;
} catch (Exception $ex) {
+
+ // If we created an empty file, clean it up.
+ if (!$is_show) {
+ if ($path !== null) {
+ Filesystem::remove($path);
+ }
+ }
+
// If we fail for any reason, fall back to the older mechanism using
// "file.info" and "file.download".
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 4:27 PM (7 h, 59 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6918796
Default Alt Text
D17800.id42808.diff (984 B)
Attached To
Mode
D17800: Fix two minor issues with "arc download"
Attached
Detach File
Event Timeline
Log In to Comment