Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
bao-qian committed May 15, 2016
1 parent 03a8a03 commit bb54cab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions SolutionAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.2.0.*")]
[assembly: AssemblyFileVersion("1.2.0.*")]
[assembly: AssemblyInformationalVersion("1.2.0.*")]
[assembly: AssemblyVersion("1.2.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0")]
4 changes: 2 additions & 2 deletions Wox.Infrastructure/Logger/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class Log
static Log()
{
var directoryName = "Logs";
var path = Path.Combine(Wox.DataPath, directoryName);
var path = Path.Combine(Wox.DataPath, directoryName, Wox.Version);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
Expand All @@ -21,7 +21,7 @@ static Log()
var configuration = new LoggingConfiguration();
var target = new FileTarget();
configuration.AddTarget("file", target);
target.FileName = "${specialfolder:folder=ApplicationData}/" + Wox.Name + "/" + directoryName + "/${shortdate}.log";
target.FileName = "${specialfolder:folder=ApplicationData}/" + Wox.Name + "/" + directoryName + "/" + Wox.Version + "/${shortdate}.log";
var rule = new LoggingRule("*", LogLevel.Info, target);
configuration.LoggingRules.Add(rule);
LogManager.Configuration = configuration;
Expand Down
3 changes: 1 addition & 2 deletions Wox/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ private void OnStartup(object sender, StartupEventArgs e)

private void OnActivated(object sender, EventArgs e)
{
// todo happlebao add option in gui
if (_settings.AutoUpdates)
{
Updater.UpdateApp();
Expand Down Expand Up @@ -109,7 +108,7 @@ public void Dispose()
// but if sessionending is not called, exit won't be called when log off / shutdown
if (!_disposed)
{
((MainViewModel)Current.MainWindow?.DataContext)?.Save();
Current.Dispatcher.Invoke(() => ((MainViewModel) Current.MainWindow?.DataContext)?.Save());
_disposed = true;
}
}
Expand Down

0 comments on commit bb54cab

Please sign in to comment.