Skip to content

Commit

Permalink
カレントディレクトリを常にexeファイルのある場所にする #6
Browse files Browse the repository at this point in the history
  • Loading branch information
onihusube committed May 3, 2022
1 parent 3acb5e2 commit b782e7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 2chAPIProxy/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public partial class App : Application
private void Application_Startup(object sender, StartupEventArgs e)
{
RemoteObject = null;

// カレントディレクトリの設定(ショートカット経由起動などで場所が変わるため)
Directory.SetCurrentDirectory(System.AppDomain.CurrentDomain.BaseDirectory);

if (File.Exists("./settings.xml"))
{
XmlSerializer xser = new XmlSerializer(typeof(AppSetting));
Expand Down

0 comments on commit b782e7f

Please sign in to comment.