-
Notifications
You must be signed in to change notification settings - Fork 3
Description
after applying the icon path to projects the new icon file path should have path, relative to project. But now it calculates path from one folder up from project file.
The reason:
in file Shared\IDE\ProjectResource.pas procedure TIconResource.SaveToProjectResource there is a call
IconFileName := ExtractRelativePath(ExtractFileDir(AProject.FileName), FFileName);ExtractRelativePath expects 1st argument as path with trailing path separator, but ExtractFileDir returns the path without trailing delimiter, so ExtractRelativePath thinks that it is full path with filename and takes one level upper.
Solution: as ExtractRelativePath can recognize whether 1s argument is directory name or path name, we can just use
IconFileName := ExtractRelativePath(AProject.FileName, FFileName);Tested by me locally on D11.1, and with that change it works as expected.
I don't use git, so cannot make any pull request,