From e432177af8d4c6c014af6bd25dfc5b1b8b13509d Mon Sep 17 00:00:00 2001 From: ninemine <1371605831@qq.com> Date: Sun, 31 Aug 2025 01:34:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Convention/[Runtime]/Config.cs | 2 +- Convention/[Runtime]/File.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Convention/[Runtime]/Config.cs b/Convention/[Runtime]/Config.cs index fe7998a..9b122d7 100644 --- a/Convention/[Runtime]/Config.cs +++ b/Convention/[Runtime]/Config.cs @@ -1273,7 +1273,7 @@ namespace Convention } return result; } - public static List SeekMemberInfo([In] object target, IEnumerable names, BindingFlags flags = BindingFlags.Default) + public static List SeekMemberInfo([In] object target, IEnumerable names, BindingFlags flags = BindingFlags.Public | BindingFlags.Instance) { Type _CurType = target.GetType(); List result = _CurType.GetMembers(flags).ToList(); diff --git a/Convention/[Runtime]/File.cs b/Convention/[Runtime]/File.cs index c10134e..142eff4 100644 --- a/Convention/[Runtime]/File.cs +++ b/Convention/[Runtime]/File.cs @@ -79,7 +79,7 @@ namespace Convention } public string GetName(bool is_ignore_extension = false) { - return this.FullPath[..( + var result = this.FullPath[..( (this.FullPath.Contains('.') && is_ignore_extension) ? this.FullPath.LastIndexOf('.') : ^0 @@ -89,6 +89,8 @@ namespace Convention ? ^1 : ^0 )]; + return result[(Mathf.Max(result.Contains('/') ? result.LastIndexOf('/') : -1, + result.Contains('\\') ? result.LastIndexOf('\\') : -1) + 1)..]; } public string GetExtension() {