From 83b3d8ba6f2839d7cef9d3f568a18d8370ca171e Mon Sep 17 00:00:00 2001 From: andresdelcampo <33843515+andresdelcampo@users.noreply.github.com> Date: Tue, 26 Apr 2022 19:36:24 +0200 Subject: [PATCH] Fix wrong rom/media paths when loading --- F_Main.pas | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/F_Main.pas b/F_Main.pas index ad198f7..ff6c772 100644 --- a/F_Main.pas +++ b/F_Main.pas @@ -371,8 +371,7 @@ function TFrm_Editor.GetPhysicalRomPath( const aRomPath: string ): string; var _Pos: Integer; begin - _Pos:= Pos( '/', aRomPath ); - Result:= FRootPath + FCurrentFolder + Copy( aRomPath, Succ( _Pos ), ( aRomPath.Length - _Pos ) ); + Result:= FRootPath + FCurrentFolder + aRomPath; Result:= StringReplace( Result, '/', '\', [rfReplaceAll] ); end; @@ -382,8 +381,7 @@ function TFrm_Editor.GetPhysicalMediaPath( const aPath: string ): string; begin if aPath.IsEmpty then Result:= '' else begin - _Pos:= Pos( '/', aPath ); - Result:= FRootPath + FCurrentFolder + Copy( aPath, Succ( _Pos ), ( aPath.Length - _Pos ) ); + Result:= FRootPath + FCurrentFolder + aPath; Result:= StringReplace( Result, '/', '\', [rfReplaceAll] ); end; end;