Browse files

When opening the log path create it if it doesn't exist.

  • Loading branch information...
1 parent 97dc1b6 commit 69bac80eb021b733e173ab4d18116a1f54a1794b @meebey meebey committed Jul 28, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/Frontend-GNOME/Preferences/PreferencesDialog.cs
View
7 src/Frontend-GNOME/Preferences/PreferencesDialog.cs
@@ -27,6 +27,7 @@
*/
using System;
+using System.IO;
using System.Text;
using System.Threading;
using System.Collections;
@@ -146,7 +147,11 @@ public PreferencesDialog(Gtk.Window parent)
((Gtk.Button)_Glade["LoggingOpenButton"]).Clicked += delegate {
ThreadPool.QueueUserWorkItem(delegate {
try {
- Process.Start(Platform.LogPath);
+ var logPath = Platform.LogPath;
+ if (!Directory.Exists(logPath)) {
+ Directory.CreateDirectory(logPath);
+ }
+ Process.Start(logPath);
} catch (Exception ex) {
Frontend.ShowError(parent, ex);
}

0 comments on commit 69bac80

Please sign in to comment.