// 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
}\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
-// 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