]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java
1. Fix EDKT330 Source files in sub-directories are not added to MSA correctly
[mirror_edk2.git] / Tools / Java / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / ui / dialog / SourceFilesDlg.java
index 6ca65fa04e7a96a97ec70ad70468878a74ac1645..d7df17eeb67f54e1abe2e4d02f0e24eeed2d20ae 100644 (file)
@@ -526,7 +526,12 @@ public class SourceFilesDlg extends IDialog {
             File f[] = fc.getSelectedFiles();\r
             String s = "";\r
             for (int index = 0; index < f.length; index++) {\r
-                s = s + f[index].getName() + ";";\r
+                String relativePath = "";\r
+                relativePath = Tools.getRelativePath(Tools.getFilePathOnly(f[index].getPath()), Tools.getFilePathOnly(msaFileName));\r
+                if (!Tools.isEmpty(relativePath)) {\r
+                    relativePath = relativePath + DataType.UNIX_FILE_SEPARATOR;\r
+                }\r
+                s = s + relativePath + f[index].getName() + ";";\r
             }\r
             this.jTextFieldFileName.setText(s);\r
         }\r