]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Fix EDKT501: New MSA get "Please type a complete file path" waring and can't proceed
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Jan 2007 01:51:51 +0000 (01:51 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Jan 2007 01:51:51 +0000 (01:51 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2215 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java

index e2b306ac9e43a83af3f7aac5422879b88701339c..6572067efe564aaa0e1bb3c6b46e960cf284d19d 100644 (file)
@@ -517,7 +517,7 @@ public class SelectModuleBelong extends IDialog {
         // Check if path is valid\r
         //\r
         File f = new File(path);\r
         // Check if path is valid\r
         //\r
         File f = new File(path);\r
-        if (!f.isFile()) {\r
+        if (!f.isAbsolute()) {\r
             Log.wrn("New File", "Please type a complete file path!");\r
             return false;\r
         }\r
             Log.wrn("New File", "Please type a complete file path!");\r
             return false;\r
         }\r
@@ -539,15 +539,13 @@ public class SelectModuleBelong extends IDialog {
             }\r
             \r
             //\r
             }\r
             \r
             //\r
-            // Check if path already exists\r
-            // Currently we allow user to add multiple msa files in one same directory\r
-            // Remove this checkpoint\r
+            // Check if the module is in selected package\r
             //\r
             //\r
-//            if (GlobalData.isDuplicateRelativePath(Tools.getFilePathOnly(modulePath), mode)) {\r
-//                Log.wrn("New File", "There already exists a same directory with a module");\r
-//                return false;\r
-//            }\r
-            \r
+            if (Tools.getFilePathOnly(modulePath).indexOf(Tools.getFilePathOnly(packagePath)) < 0) {\r
+                Log.wrn("New File", "This module should be in the directory of selected package!");\r
+                return false;\r
+            }\r
+                      \r
             //\r
             // Check if Guid+Version is unique\r
             //\r
             //\r
             // Check if Guid+Version is unique\r
             //\r