From 20d7013c600ea9c95255d74c35343db217d91bec Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Tue, 17 Dec 2019 11:37:12 +0100 Subject: Mono/C#: Fix project export and fix FindLast/GetFile regression d09193b08ae8fdb082bee6ffd3828eb19fd45ce6 introduced a regression in StringExtensions.FindLast. StringExtensions.GetFile was also affected as it relies on FindLast. This in turn broke the project exporter as it uses GetFile. The cause of the regression is that now FindLast is calling LastIndexOf with 'startIndex: 0'. This should be 'startIndex: str.Length - 1' instead. Also fixed another regression in the project exporter: de7c2ad21b4cc2d889a5aeda64ead962036d2aa4 moved 'GodotTools/GodotSharpExport.cs' to 'GodotTools/Export/ExportPlugin.cs' and in doing so accidently reverted the changes from commit e439581198de92e63661c4fe71108cb59cc2d999. --- modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/mono/editor/GodotTools') diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs index b17a3f4491..dd1b58b34b 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs @@ -39,7 +39,7 @@ namespace GodotTools.Export private void AddFile(string srcPath, string dstPath, bool remap = false) { - AddFile(dstPath, File.ReadAllBytes(srcPath), remap); + AddFile(dstPath.Replace("\\", "/"), File.ReadAllBytes(srcPath), remap); } public override void _ExportFile(string path, string type, string[] features) -- cgit v1.2.3