mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-02-05 21:30:52 +00:00
Fixed problem with specifying absolute paths for source files. Closes #576
This commit is contained in:
parent
511e47f69e
commit
4d70e8c410
@ -19,6 +19,14 @@ public class SourceLoader {
|
||||
* @return The file if found. null if not.
|
||||
*/
|
||||
public static File loadFile(String fileName, Path currentPath, List<String> searchPaths) {
|
||||
File fileAbs = new File(fileName);
|
||||
if(fileAbs.isAbsolute())
|
||||
if(fileAbs.exists())
|
||||
return fileAbs;
|
||||
else
|
||||
return null;
|
||||
|
||||
// File name is relative - look through search paths
|
||||
List<String> allSearchPaths = new ArrayList<>();
|
||||
if(currentPath != null)
|
||||
allSearchPaths.add(currentPath.toString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user