Commit c0a67729 authored by Archnoc's avatar Archnoc

directory error fix

parent d940987f
......@@ -355,7 +355,8 @@ namespace sunrise_launcher
{
if (hash == null) return false;
Directory.CreateDirectory(Path.GetDirectoryName(path));
var dirname = Path.GetDirectoryName(path);
if (!string.IsNullOrWhiteSpace(dirname)) Directory.CreateDirectory(dirname);
long size = 0;
byte[] checksum;
......@@ -390,10 +391,10 @@ namespace sunrise_launcher
}
catch (Exception ex)
{
Console.WriteLine("exception while downloading source {0}: {0}", source.URL, ex.Message);
Console.WriteLine("exception while downloading source {0}: {1}", source.URL, ex.Message);
if (ex.InnerException != null)
{
Console.WriteLine("inner exception: {0}", source.URL, ex.InnerException.Message);
Console.WriteLine("inner exception: {0}: {1}", source.URL, ex.InnerException.Message);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment