mirror of
https://github.com/tonytins/s2pk.git
synced 2025-05-19 15:33:17 -04:00
Extension checking happens after it checks if it even exists
This commit is contained in:
parent
467cbea8d4
commit
6f54963287
1 changed files with 7 additions and 6 deletions
|
@ -83,18 +83,19 @@ 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.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!file.FullName.Contains(extension))
|
||||
{
|
||||
Console.Error.WriteLine("Package file is not a valid.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for extension mismatch
|
||||
if (file.FullName.Contains(S3pkExtension) && !ts3)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue