Skip to content

Commit ba8d70f

Browse files
Fix: Fixed issue with creating new archives in a library (#11100)
1 parent 9782b85 commit ba8d70f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Files.App/Interacts/BaseLayoutCommandImplementationModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,13 @@ public async Task CompressIntoSevenZip()
633633
string[] sources = associatedInstance.SlimContentPage.SelectedItems
634634
.Select(item => item.ItemPath)
635635
.ToArray();
636-
637636
if (sources.Length is 0)
638637
return (sources, string.Empty, string.Empty);
639638

640639
string directory = associatedInstance.FilesystemViewModel.WorkingDirectory.Normalize();
640+
if (App.LibraryManager.TryGetLibrary(directory, out var library) && !library.IsEmpty)
641+
directory = library.DefaultSaveFolder;
642+
641643
string fileName = Path.GetFileName(sources.Length is 1 ? sources[0] : directory);
642644

643645
return (sources, directory, fileName);

0 commit comments

Comments
 (0)