OSDN Git Service

設定ダイアログのファイル名を絶対パスに変換しない
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Thu, 10 May 2018 11:56:38 +0000 (20:56 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Thu, 10 May 2018 11:56:38 +0000 (20:56 +0900)
KancolleSniffer/Config.cs

index 6ed2d86..2a1d1b0 100644 (file)
@@ -231,11 +231,6 @@ namespace KancolleSniffer
         public static readonly string BaseDir = AppDomain.CurrentDomain.BaseDirectory;\r
         private static readonly string ConfigFile = Path.Combine(BaseDir, FileName);\r
 \r
-        public Config()\r
-        {\r
-            ConvertPath(PrependBaseDir);\r
-        }\r
-\r
         public void InitializeValues()\r
         {\r
             NotifyConditions = new List<int>(new[] {40, 49});\r
@@ -286,7 +281,6 @@ namespace KancolleSniffer
             {\r
                 throw new Exception(FileName + "が壊れています。", ex);\r
             }\r
-            ConvertPath(PrependBaseDir);\r
         }\r
 \r
         private void ComposeNotificationFlags()\r
@@ -346,7 +340,5 @@ namespace KancolleSniffer
             path = path.Substring(BaseDir.Length);\r
             return path.TrimStart(Path.DirectorySeparatorChar);\r
         }\r
-\r
-        private string PrependBaseDir(string path) => Path.IsPathRooted(path) ? path : Path.Combine(BaseDir, path);\r
     }\r
 }
\ No newline at end of file