public static string CreateConflictFoldername(String path, String user)
{
if (!Directory.Exists(path))
{
return path;
}
else
{
string ret = String.Format("{0}_{1}-conflict-version", path, user);
if (!Directory.Exists(ret))
return ret;
int index = 1;
do
{
ret = String.Format("{0}_{1}-conflict-version ({2})", path, user, index.ToString());
if (!Directory.Exists(ret))
{
return ret;
}
index++;
}
while (true);
}
}