mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: Properly handle UTF-8 characters in ImGUI paths (#2122)
- Fixes a bug where users with special characters in their filenames would not be able to save `dalamudUI.ini`. - Throw a special warning if `dalamudUI.ini` doesn't exist, as it's not an error case.
This commit is contained in:
parent
0fdcffd3ad
commit
903a5ad5da
2 changed files with 9 additions and 2 deletions
|
|
@ -604,10 +604,17 @@ internal partial class InterfaceManager : IInternalDisposableService
|
|||
if (iniFileInfo.Length > 1200000)
|
||||
{
|
||||
Log.Warning("dalamudUI.ini was over 1mb, deleting");
|
||||
iniFileInfo.CopyTo(Path.Combine(iniFileInfo.DirectoryName!, $"dalamudUI-{DateTimeOffset.Now.ToUnixTimeSeconds()}.ini"));
|
||||
iniFileInfo.CopyTo(
|
||||
Path.Combine(
|
||||
iniFileInfo.DirectoryName!,
|
||||
$"dalamudUI-{DateTimeOffset.Now.ToUnixTimeSeconds()}.ini"));
|
||||
iniFileInfo.Delete();
|
||||
}
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
Log.Warning("dalamudUI.ini did not exist, ImGUI will create a new one.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Could not delete dalamudUI.ini");
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2f37349ffd778561a1103a650683116c43edc86c
|
||||
Subproject commit d5dfde4b39b032430deb46bc61084c18fb54b986
|
||||
Loading…
Add table
Add a link
Reference in a new issue