Skip to content

Commit 5890710

Browse files
committed
ModuleScriptEditor: Override itself when updating
1 parent be0460f commit 5890710

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Editors/ModuleScriptEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace KeepCoding.Internal
2323
[CanEditMultipleObjects, CustomEditor(typeof(ModuleScript), true)]
2424
public sealed class ModuleScriptEditor : Editor
2525
{
26-
private static string SelfPath => GetDirectoryName(UnescapeDataString(new UriBuilder(GetExecutingAssembly().CodeBase).Path));
26+
private static string SelfPath => UnescapeDataString(new UriBuilder(GetExecutingAssembly().CodeBase).Path);
2727

2828
/// <summary>
2929
/// Creates the colorblind button.
@@ -84,7 +84,7 @@ private static IEnumerator InstallLatest(string tagName, string extension)
8484

8585
Self($"Installing the latest {extension} file...");
8686

87-
WriteAllBytes(Combine(SelfPath, $"KeepCoding {tagName}.{extension}"), UTF8.GetBytes(web.downloadHandler.text));
87+
WriteAllBytes(SelfPath, web.downloadHandler.data);
8888
}
8989
}
9090
}

0 commit comments

Comments
 (0)