Skip to content

Commit

Permalink
Fix wrong rom/media paths when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
andresdelcampo committed Apr 26, 2022
1 parent 5d0b6df commit 83b3d8b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions F_Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 83b3d8b

Please sign in to comment.