-
Notifications
You must be signed in to change notification settings - Fork 723
Closed
Description
When you specify a --authors=
value when doing a clone
command the File.Copy
for this section
public bool Parse(string authorsFilePath, string gitDir)
{
var savedAuthorFile = Path.Combine(gitDir, GitTfsCachedAuthorsFileName);
if (!string.IsNullOrWhiteSpace(authorsFilePath))
{
if (!File.Exists(authorsFilePath))
{
throw new GitTfsException("Authors file cannot be found: '" + authorsFilePath + "'");
}
else
{
Trace.WriteLine("Reading authors file : " + authorsFilePath);
bool parseSuccess;
using (StreamReader sr = new StreamReader(authorsFilePath))
{
parseSuccess = Parse(sr);
}
try
{
File.Copy(authorsFilePath, savedAuthorFile, true);
return parseSuccess;
}
catch (Exception) { }
}
}
...
Will only have .git
passed in to gitDir
this causes the 2nd argument to File.Copy
to be .git\git-tfs_authors
which will be aginst the relitive path of where you ran git-tfs, not the path of the directory that is about to be cloned.
I think both the incorrect path and a trace warning inside the empty catch block should be fixed.
Metadata
Metadata
Assignees
Labels
No labels