From 7a02854e2da3352387c1c27c85b31855e18e9e60 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 31 Dec 2024 11:19:05 +0800 Subject: [PATCH] fix: bad output file name while creating archive by tag --- src/ViewModels/Archive.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ViewModels/Archive.cs b/src/ViewModels/Archive.cs index 366a6179..0a180b71 100644 --- a/src/ViewModels/Archive.cs +++ b/src/ViewModels/Archive.cs @@ -23,7 +23,7 @@ namespace SourceGit.ViewModels { _repo = repo; _revision = branch.Head; - _saveFile = $"archive-{Path.GetFileNameWithoutExtension(branch.Name)}.zip"; + _saveFile = $"archive-{Path.GetFileName(branch.Name)}.zip"; BasedOn = branch; View = new Views.Archive() { DataContext = this }; } @@ -41,7 +41,7 @@ namespace SourceGit.ViewModels { _repo = repo; _revision = tag.SHA; - _saveFile = $"archive-{tag.Name}.zip"; + _saveFile = $"archive-{Path.GetFileName(tag.Name)}.zip"; BasedOn = tag; View = new Views.Archive() { DataContext = this }; }