Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 19, 2021. It is now read-only.

Commit 48c3075

Browse files
fix utf8 project path parsing fixes #72
1 parent bcefe97 commit 48c3075

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎UnityLauncher/Form1.cs‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,14 @@ void UpdateRecentProjectsList()
307307
{
308308
RegistryKey key = hklm.OpenSubKey(registryPathsToCheck[i]);
309309

310-
if (key == null) continue;
310+
if (key == null)
311+
{
312+
continue;
313+
}
314+
else
315+
{
316+
Console.WriteLine("Null registry key at "+ registryPathsToCheck[i]);
317+
}
311318

312319
// parse recent project path
313320
foreach (var valueName in key.GetValueNames())
@@ -320,7 +327,7 @@ void UpdateRecentProjectsList()
320327
if (valueKind == RegistryValueKind.Binary)
321328
{
322329
byte[] projectPathBytes = (byte[])key.GetValue(valueName);
323-
projectPath = Encoding.Default.GetString(projectPathBytes, 0, projectPathBytes.Length - 1);
330+
projectPath = Encoding.UTF8.GetString(projectPathBytes, 0, projectPathBytes.Length - 1);
324331
}
325332
else // should be string then
326333
{
@@ -330,6 +337,7 @@ void UpdateRecentProjectsList()
330337
// first check if whole folder exists, if not, skip
331338
if (Directory.Exists(projectPath) == false)
332339
{
340+
Console.WriteLine("Recent project directory not found, skipping: "+ projectPath);
333341
continue;
334342
}
335343

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /