Skip to content

Conversation

@im1dermike
Copy link

No description provided.

@im1dermike
Copy link
Author

Hoping I did this right. It's the first time I've collaborated on github. ;)

@im1dermike
Copy link
Author

Actually, the following will allow for spaces in the filenames:

public bool CopyFile(string localPath, string depotPath)
{
var result = false;
var stdout = String.Empty;
if (!loggedIn)
Login();
var stringifiedLocalPath = String.Format(""{0}"", localPath);
var stringifiedDepotPath = String.Format(""{0}"", depotPath);
try
{
env.ExecuteThrow("p4", new string[] { "print", "-o", stringifiedLocalPath, stringifiedDepotPath }, out stdout);
var fileInfo = new FileInfo(localPath);
fileInfo.IsReadOnly = false;
result = true;
}
catch (ApplicationException e)
{
Console.Error.WriteLine(e.Message);
}
return result;
}

@inorton
Copy link
Owner

inorton commented Mar 18, 2015

so sorry it took me so long!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indenting is a bit mixed up. Also this wont work so well if the line endings in the client are wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants