Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15396073
D10510.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10510.diff
View Options
diff --git a/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
--- a/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
+++ b/src/applications/drydock/blueprint/DrydockAmazonEC2HostBlueprintImplementation.php
@@ -861,9 +861,17 @@
'Releasing lease %d',
$lease->getID()));
- $cmd = $lease->getInterface('command');
$path = $lease->getAttribute('path');
+ // Set the path back to null for the lease. This ensures on Windows
+ // machines we don't change to the directory we're about to delete, because
+ // Windows implicitly locks a directory from deletion whenever there is a
+ // process with it's current working directory within that directory or
+ // any of it's sub-directories.
+ $lease->setAttribute('path', null);
+
+ $cmd = $lease->getInterface('command');
+
try {
$this->log(pht(
'Removing contents of \'%s\' on host',
@@ -883,7 +891,12 @@
'occur when files are locked by the operating system. The exception '.
'message was \'%s\'.',
$ex->getMessage()));
+ return;
}
+
+ $this->log(pht(
+ 'Removed contents of \'%s\' on host successfully',
+ $path));
}
public function getType() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 11:40 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7708317
Default Alt Text
D10510.diff (1 KB)
Attached To
Mode
D10510: Fix issue where Windows machines don't delete lease directory correctly
Attached
Detach File
Event Timeline
Log In to Comment