Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion runtime/src/main/java/com/tns/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private static File resolveFromFileOrDirectory(String baseDir, String path, File
File foundModule = null;

foundModule = loadAsFile(fileOrDirectory);

if(foundModule != null) {
return foundModule;
}
Expand All @@ -198,6 +199,8 @@ private static File resolveFromFileOrDirectory(String baseDir, String path, File
//cache resolved directory
if(foundModule != null) {
folderAsModuleCache.put(fileOrDirectory.getCanonicalPath(), foundModule.getCanonicalPath());

return foundModule;
}

return foundModule;
Expand All @@ -222,7 +225,8 @@ private static File loadAsFile(File path) {

File foundFile = new File(path.getAbsolutePath() + fallbackExtension);
try {
if(foundFile.getCanonicalFile().exists()) {
File canonicalFile = foundFile.getCanonicalFile();
if (canonicalFile.exists() && canonicalFile.isFile()) {
return foundFile;
}
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion test-app/app/src/main/assets/app/shared