Skip to content

Portable Tool for an Ideal Windows Setup

fix creating a folder when unpacking

Greedeksebec59e7d0f7
diff --git a/.Source/GTweak/Utilities/Managers/ArchiveManager.cs b/.Source/GTweak/Utilities/Managers/ArchiveManager.cs
index b3e2c3fa..f87d1a1e 100644
--- a/.Source/GTweak/Utilities/Managers/ArchiveManager.cs
+++ b/.Source/GTweak/Utilities/Managers/ArchiveManager.cs
@@ -8,15 +8,15 @@ namespace GTweak.Utilities.Managers
{
internal static void Unarchive(string path, byte[] resource)
{
- using MemoryStream fileOut = new MemoryStream(resource);
- using GZipStream gzipStream = new GZipStream(fileOut, CompressionMode.Decompress);
- using FileStream fileStream = new FileStream(path, FileMode.Create, FileAccess.Write);
-
string folderDir = path.Remove(path.LastIndexOf(@"\", StringComparison.OrdinalIgnoreCase));
if (!Directory.Exists(folderDir))
Directory.CreateDirectory(folderDir);
+ using MemoryStream fileOut = new MemoryStream(resource);
+ using GZipStream gzipStream = new GZipStream(fileOut, CompressionMode.Decompress);
+ using FileStream fileStream = new FileStream(path, FileMode.Create, FileAccess.Write);
+
gzipStream.CopyTo(fileStream);
}
}
diff --git a/.Source/GTweak/Windows/MainWindow.xaml b/.Source/GTweak/Windows/MainWindow.xaml
index 279e5423..ebf4c128 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml
+++ b/.Source/GTweak/Windows/MainWindow.xaml
@@ -314,21 +314,21 @@
<Grid Grid.Column="0">
<StackPanel Orientation="Horizontal" Margin="20,0,0,0">
- <Image x:Uid="git" Width="31" Height="auto" PreviewMouseLeftButtonUp="BtnContats_PreviewMouseLeftButtonUp" Cursor="Hand">
+ <Image x:Uid="git" Width="31" Height="auto" PreviewMouseLeftButtonUp="BtnContacts_PreviewMouseLeftButtonUp" Cursor="Hand">
<Image.Style>
<Style TargetType="{x:Type Image}" BasedOn="{StaticResource Apps}">
<Setter Property="Source" Value="{StaticResource DI_Git}"/>
</Style>
</Image.Style>
</Image>
- <Image x:Uid="tg" Width="31" Height="auto" PreviewMouseLeftButtonUp="BtnContats_PreviewMouseLeftButtonUp" Cursor="Hand">
+ <Image x:Uid="tg" Width="31" Height="auto" PreviewMouseLeftButtonUp="BtnContacts_PreviewMouseLeftButtonUp" Cursor="Hand">
<Image.Style>
<Style TargetType="{x:Type Image}" BasedOn="{StaticResource Apps}">
<Setter Property="Source" Value="{StaticResource DI_Telegram}"/>
</Style>
</Image.Style>
</Image>
- <Image x:Uid="steam" Width="31" Height="auto" PreviewMouseLeftButtonUp="BtnContats_PreviewMouseLeftButtonUp" Cursor="Hand">
+ <Image x:Uid="steam" Width="31" Height="auto" PreviewMouseLeftButtonUp="BtnContacts_PreviewMouseLeftButtonUp" Cursor="Hand">
<Image.Style>
<Style TargetType="{x:Type Image}" BasedOn="{StaticResource Apps}">
<Setter Property="Source" Value="{StaticResource DI_Steam}"/>
diff --git a/.Source/GTweak/Windows/MainWindow.xaml.cs b/.Source/GTweak/Windows/MainWindow.xaml.cs
index 4f1c8c60..5b5958f4 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml.cs
+++ b/.Source/GTweak/Windows/MainWindow.xaml.cs
@@ -161,7 +161,7 @@ namespace GTweak
private void BtnDelete_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsEngine.SelfRemoval();
- private void BtnContats_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+ private void BtnContacts_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
Process.Start(new ProcessStartInfo(((Image)sender).Uid switch
{