Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zhili1208 committed May 16, 2016
1 parent 98175cc commit 112fe2a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public static void DeleteFile(string fullPath, INuGetProjectContext nuGetProject
{
MakeWritable(fullPath);
var sourceControlManager = SourceControlUtility.GetSourceControlManager(nuGetProjectContext);
if (sourceControlManager != null)
if (sourceControlManager != null && sourceControlManager.IsPackagesFolderBoundToSourceControl())
{
sourceControlManager.PendDeleteFiles(new List<string> { fullPath }, string.Empty, nuGetProjectContext);
}
Expand Down Expand Up @@ -253,7 +253,7 @@ public static void DeleteFiles(IEnumerable<ZipFilePair> packageFiles, string pac
}

var sourceControlManager = SourceControlUtility.GetSourceControlManager(nuGetProjectContext);
if (sourceControlManager != null)
if (sourceControlManager != null && sourceControlManager.IsPackagesFolderBoundToSourceControl())
{
sourceControlManager.PendDeleteFiles(filesToDelete, packagesDir, nuGetProjectContext);
foreach (var fileToDelete in filesToDelete)
Expand Down

0 comments on commit 112fe2a

Please sign in to comment.