Skip to content

Commit

Permalink
Work for #133
Browse files Browse the repository at this point in the history
Check to see if the file exists prior to attempting
to delete. Fix a regression to #111, that I introduced.
  • Loading branch information
sc68cal committed Mar 7, 2012
1 parent 1324ba3 commit aab035d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GitTfs.VsCommon/Wrappers.cs
Expand Up @@ -449,8 +449,8 @@ public int PendDelete(string path)
public int PendRename(string pathFrom, string pathTo)
{
FileInfo info = new FileInfo(pathTo);
if (!info.Directory.Exists)
info.Directory.Create();
if (info.Exists)
info.Delete();
return _workspace.PendRename(pathFrom, pathTo);
}

Expand Down

0 comments on commit aab035d

Please sign in to comment.