From 467cbea8d4be60ca8676dea2c44a458aa5198c14 Mon Sep 17 00:00:00 2001 From: Tony Bark Date: Wed, 30 Apr 2025 10:28:45 -0400 Subject: [PATCH] More unpacking checks --- PackageManger.cs | 6 ++++++ README.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/PackageManger.cs b/PackageManger.cs index 7f27084..90dd948 100644 --- a/PackageManger.cs +++ b/PackageManger.cs @@ -83,6 +83,12 @@ public static class PackageManager var file = new FileInfo(package); var dir = new DirectoryInfo(destination); + if (!file.FullName.Contains(extension)) + { + Console.Error.WriteLine("Package file is not a valid."); + return; + } + if (!file.Exists) { Console.Error.WriteLine("Package file does not exist."); diff --git a/README.md b/README.md index 1976792..85574da 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ While The Sims 2 runs well on Linux through Wine, especially with Lutris setups, You can build yourself with `make`, or use the installer script: ```shell -./install.sh ./dist/s2pk-linux/s2pkg +./install.sh ./dist/s2pk-linux/s2pk ``` Make sure `~/.local/bin` is in your `PATH`: