X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FGenBuild%2Forg%2Ftianocore%2Fbuild%2Fid%2FPlatformIdentification.java;h=c5c2f1e03040c198961719e1299f465df9d1ad3f;hp=530ecedc86aefde61b6824a9ce68b588618825a7;hb=53d853a683b47ad9dc2aed3f55166d8b66c899d2;hpb=5f42a4badadec3d4928c6483aea22d3073ac5441 diff --git a/Tools/Source/GenBuild/org/tianocore/build/id/PlatformIdentification.java b/Tools/Source/GenBuild/org/tianocore/build/id/PlatformIdentification.java index 530ecedc86..c5c2f1e030 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/id/PlatformIdentification.java +++ b/Tools/Source/GenBuild/org/tianocore/build/id/PlatformIdentification.java @@ -51,10 +51,18 @@ public class PlatformIdentification extends Identification{ } public String getRelativeFpdFile (){ - return fpdFile.getPath().substring(GlobalData.getWorkspacePath().length()); + String relativeDir = fpdFile.getPath().substring(GlobalData.getWorkspacePath().length()); + if(relativeDir.startsWith("\\") || relativeDir.startsWith("/")) { + relativeDir = relativeDir.substring(1); + } + return relativeDir; } public String getPlatformRelativeDir(){ - return fpdFile.getParent().substring(GlobalData.getWorkspacePath().length()); + String relativeDir = fpdFile.getParent().substring(GlobalData.getWorkspacePath().length()); + if(relativeDir.startsWith("\\") || relativeDir.startsWith("/")) { + relativeDir = relativeDir.substring(1); + } + return relativeDir; } } \ No newline at end of file