Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zhili1208 committed May 9, 2016
1 parent fade533 commit 5876486
Showing 1 changed file with 2 additions and 2 deletions.
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 5876486

Please sign in to comment.