-
Notifications
You must be signed in to change notification settings - Fork 269
Closed
Labels
Priority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Type:Bug
Milestone
Description
The second delete throws most of the time on the happy path. Not sure why this call is there to begin with, but we can definitely check if the directory doesn't exist before trying to delete it the first time.
msBuildNuGetProjectSystem.DeleteDirectory(path, recursive);
// Workaround for update-package TFS issue. If we're bound to TFS, do not try and delete directories.
var sourceControlManager = SourceControlUtility.GetSourceControlManager(msBuildNuGetProjectSystem.NuGetProjectContext);
if (sourceControlManager != null)
{
// Source control bound, do not delete
return;
}
try
{
Directory.Delete(fullPath, recursive);
// The directory is not guaranteed to be gone since there could be
// other open handles. Wait, up to half a second, until the directory is gone.
for (var i = 0; Directory.Exists(fullPath) && i < 5; ++i)
{
Thread.Sleep(100);
}
msBuildNuGetProjectSystem.RemoveFile(path);
msBuildNuGetProjectSystem.NuGetProjectContext.Log(MessageLevel.Debug, Strings.Debug_RemovedFolder, fullPath);
}
catch (DirectoryNotFoundException)
{
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Type:Bug
Type
Fields
Give feedbackNo fields configured for issues without a type.