diff --git a/GameRes/ArchiveFormat.cs b/GameRes/ArchiveFormat.cs index 4bfa0568..4e561d45 100644 --- a/GameRes/ArchiveFormat.cs +++ b/GameRes/ArchiveFormat.cs @@ -133,6 +133,14 @@ namespace GameRes { return count > 0 && count < 0x20000; } + + /// + /// Whether represents a valid archive entry name. + /// + public static bool IsValidEntryName (string name) + { + return !string.IsNullOrWhiteSpace (name) && !Path.IsPathRooted (name); + } } public enum ArchiveOperation