mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
remove useless stream.close and more log
This commit is contained in:
parent
0a2592893d
commit
fdfd684e7a
1 changed files with 4 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ namespace Wox.Infrastructure.Storage
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stream.Close();
|
Log.Error($"Zero length cache file: {FilePath}");
|
||||||
Save(defaultData);
|
Save(defaultData);
|
||||||
return defaultData;
|
return defaultData;
|
||||||
}
|
}
|
||||||
|
|
@ -47,6 +47,7 @@ namespace Wox.Infrastructure.Storage
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Log.Info("Cache file not exist, load default data");
|
||||||
Save(defaultData);
|
Save(defaultData);
|
||||||
return defaultData;
|
return defaultData;
|
||||||
}
|
}
|
||||||
|
|
@ -68,9 +69,8 @@ namespace Wox.Infrastructure.Storage
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
Log.Error($"Broken cache file: {FilePath}");
|
Log.Error($"Deserialize error for cache file: {FilePath}");
|
||||||
Log.Exception(e);
|
Log.Exception(e);
|
||||||
stream.Close();
|
|
||||||
return defaultData;
|
return defaultData;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
@ -110,6 +110,7 @@ namespace Wox.Infrastructure.Storage
|
||||||
}
|
}
|
||||||
catch (SerializationException e)
|
catch (SerializationException e)
|
||||||
{
|
{
|
||||||
|
Log.Error($"Serialize error for cache file: {FilePath}");
|
||||||
Log.Exception(e);
|
Log.Exception(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue