mirror of
https://github.com/ppy/osu
synced 2024-12-23 23:33:36 +00:00
Shortcut checking for whether directories are files
This commit is contained in:
parent
681759582b
commit
15b140b2ee
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using SharpCompress.Archives.Zip;
|
||||
|
||||
namespace osu.Game.Utils
|
||||
@ -10,6 +11,9 @@ namespace osu.Game.Utils
|
||||
{
|
||||
public static bool IsZipArchive(string path)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
using (var arc = ZipArchive.Open(path))
|
||||
|
Loading…
Reference in New Issue
Block a user