git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2215
6f19259b-4bc3-4df7-8a09-
765794883524
// 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.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
- // 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
-// 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