mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 12:29:29 +02:00
IDE: Use correct path delimiters on Windows when publishing a project/package.
git-svn-id: trunk@58798 -
This commit is contained in:
parent
37069ae512
commit
be4f5624f2
@ -207,15 +207,15 @@ procedure TPublisher.AdjustTopDir(const AFileName: string);
|
|||||||
// Adjust the actual top directory. It will differ from the
|
// Adjust the actual top directory. It will differ from the
|
||||||
// main dir when project/package has files up in directory structure.
|
// main dir when project/package has files up in directory structure.
|
||||||
var
|
var
|
||||||
RelPath: string;
|
RelPath, UpALevel: string;
|
||||||
Adjusted: Boolean;
|
Adjusted: Boolean;
|
||||||
begin
|
begin
|
||||||
Assert(Pos('\',AFileName) = 0, 'AdjustTopDir: File name contains a backslash.');
|
UpALevel := '..' + DirectorySeparator;
|
||||||
RelPath := ExtractRelativePath(FTopDir, AFilename);
|
RelPath := ExtractRelativePath(FTopDir, AFilename);
|
||||||
Adjusted := False;
|
Adjusted := False;
|
||||||
while Copy(RelPath, 1, 3) = '../' do
|
while Copy(RelPath, 1, 3) = UpALevel do
|
||||||
begin
|
begin
|
||||||
FTopDir := FTopDir + '../'; // This file is in upper dir. Move TopDir up, too.
|
FTopDir := FTopDir + UpALevel; // This file is in upper dir. Move TopDir up, too.
|
||||||
Delete(RelPath, 1, 3);
|
Delete(RelPath, 1, 3);
|
||||||
Adjusted := True;
|
Adjusted := True;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user