mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
fix<CommitViewer>: fix save revision file to path error when selected file is managed by LFS
This commit is contained in:
parent
0e48344401
commit
db799f5c92
3 changed files with 37 additions and 29 deletions
|
@ -298,12 +298,12 @@ namespace SourceGit.UI {
|
|||
saveAs.Header = "Save As ...";
|
||||
saveAs.Click += (obj, ev) => {
|
||||
var dialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
dialog.Description = change.Path;
|
||||
dialog.Description = path;
|
||||
dialog.ShowNewFolderButton = true;
|
||||
|
||||
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
|
||||
var savePath = Path.Combine(dialog.SelectedPath, Path.GetFileName(path));
|
||||
repo.RunAndRedirect($"show {commit.SHA}:\"{path}\"", savePath);
|
||||
commit.SaveFileTo(repo, path, savePath);
|
||||
}
|
||||
};
|
||||
menu.Items.Add(saveAs);
|
||||
|
@ -526,7 +526,7 @@ namespace SourceGit.UI {
|
|||
|
||||
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
|
||||
var path = Path.Combine(dialog.SelectedPath, node.Name);
|
||||
repo.RunAndRedirect($"show {commit.SHA}:\"{node.FilePath}\"", path);
|
||||
commit.SaveFileTo(repo, node.FilePath, path);
|
||||
}
|
||||
};
|
||||
menu.Items.Add(saveAs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue