Skip to content

Commit

Permalink
Fixing errorneous logfile path
Browse files Browse the repository at this point in the history
  • Loading branch information
synhershko committed Jul 26, 2012
1 parent b7b626b commit f9eda34
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/NAppUpdate.Updater/AppStart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private static void Main()
bool relaunchApp = dto.RelaunchApplication;

if (!string.IsNullOrEmpty(dto.AppPath))
logFile = Path.Combine(dto.AppPath, @"NauUpdate.log"); // now we can log to a more accessible location
logFile = Path.Combine(Path.GetDirectoryName(dto.AppPath), @"NauUpdate.log"); // now we can log to a more accessible location

if (dto.Tasks == null || dto.Tasks.Count == 0)
throw new Exception("Could not find the updates list (or it was empty).");
Expand Down Expand Up @@ -193,7 +193,13 @@ private static void Main()
}
finally
{
if (_args.Log) _logger.Dump(logFile);
if (_args.Log)
{
// at this stage we can't make any assumptions on correctness of the path
FileSystem.CreateDirectoryStructure(logFile, true);
_logger.Dump(logFile);
}

if (_args.ShowConsole)
{
if (_args.Log)
Expand Down

0 comments on commit f9eda34

Please sign in to comment.