Skip to content

Commit d878f2d

Browse files
committed
2496: Fix return value for non-Magento files in path copying
Updated the method to return an empty string instead of the full path for non-Magento files, ensuring consistent behavior. This also handles exceptions more cleanly by aligning the return values.
1 parent 03c6be9 commit d878f2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/magento/idea/magento2plugin/actions/CopyMagentoPath.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ public CopyMagentoPath() {
8484
} else if (isMagentoFile(virtualFile)) {
8585
paths = webPaths;
8686
} else {
87-
return fullPath.toString();
87+
return "";
8888
}
8989

9090
try {
9191
return getResultPath(virtualFile, paths, fullPath, moduleName);
9292
} catch (ArrayIndexOutOfBoundsException exception) {
93-
return fullPath.toString();
93+
return "";
9494
}
9595
}
9696

0 commit comments

Comments
 (0)