OSDN Git Service

AppliStation,キャッシュフォルダ選択ダイアログを操作した後にカレントディレクトリが変化する不具合を修正
authorttp <ttp@users.sourceforge.jp>
Sat, 27 Feb 2010 14:54:08 +0000 (23:54 +0900)
committerttp <ttp@users.sourceforge.jp>
Sat, 27 Feb 2010 14:54:08 +0000 (23:54 +0900)
AppliStation/UserPrefForm.cs

index 190b1c0..9478094 100644 (file)
@@ -390,6 +390,7 @@ namespace AppliStation
                \r
                void CacheFolderBrowseButtonClick(object sender, EventArgs e)\r
                {\r
+                       string pwd = System.IO.Directory.GetCurrentDirectory();\r
                        FolderBrowserDialog fd = new FolderBrowserDialog();\r
                        fd.Description = "キャッシュフォルダーを指定してください。";\r
                        fd.SelectedPath = cacheFolderTextBox.Text;\r
@@ -398,6 +399,8 @@ namespace AppliStation
                        if (fd.ShowDialog(this) == DialogResult.OK) {\r
                                cacheFolderTextBox.Text = fd.SelectedPath;\r
                        }\r
+                       \r
+                       System.IO.Directory.SetCurrentDirectory(pwd); // ダイアログで変わったカレントディレクトリを元に戻す\r
                }\r
                \r
                void CacheFolderTextBoxValidating(object sender, System.ComponentModel.CancelEventArgs e)\r