Skip to content

Commit

Permalink
修复特殊字符文件名导致的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mujianwu committed Jul 29, 2024
1 parent aec6928 commit 32a2580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion UotanToolbox/Common/StringHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public static string FilePath(string path)
int startIndex = Global.System == "Windows" ? 8 : 7;
return path.Substring(startIndex);
}
return path;
return Uri.UnescapeDataString(path);
}

public static int TextBoxLine(string info)
Expand Down
4 changes: 2 additions & 2 deletions UotanToolbox/Features/Dashboard/DashboardView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ private async void OpenMagiskFile(object sender, RoutedEventArgs args)
patch_busy(false);
return;
}
MagiskFile.Text = Uri.UnescapeDataString(StringHelper.FilePath(files[0].Path.ToString()));
MagiskFile.Text = StringHelper.FilePath(files[0].Path.ToString());
Global.Zipinfo = await ZipDetect.Zip_Detect(MagiskFile.Text);
SukiHost.ShowDialog(new PureDialog($"{GetTranslation("Basicflash_DetectZIP")}\nUseful:{Global.Zipinfo.IsUseful}\nMode:{Global.Zipinfo.Mode}\nVersion:{Global.Zipinfo.Version}"), allowBackgroundClose: true);
}
Expand Down Expand Up @@ -388,7 +388,7 @@ private async void OpenBootFile(object sender, RoutedEventArgs args)
patch_busy(false);
return;
}
BootFile.Text = Uri.UnescapeDataString(StringHelper.FilePath(files[0].Path.ToString()));
BootFile.Text = StringHelper.FilePath(files[0].Path.ToString());
Global.Bootinfo = await BootDetect.Boot_Detect(BootFile.Text);
ArchList.SelectedItem = Global.Bootinfo.Arch;
SukiHost.ShowDialog(new PureDialog($"{GetTranslation("Basicflash_DetectdBoot")}\nArch:{Global.Bootinfo.Arch}\nOS:{Global.Bootinfo.OSVersion}\nPatch_level:{Global.Bootinfo.PatchLevel}\nRamdisk:{Global.Bootinfo.HaveRamdisk}\nKMI:{Global.Bootinfo.KMI}"), allowBackgroundClose: true);
Expand Down

0 comments on commit 32a2580

Please sign in to comment.