mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2025-04-16 13:10:50 +00:00
Revert "Revert "WIP""
This reverts commit 1b676f83681f69cf322faecdf3806d82ad0ef05f.
This commit is contained in:
parent
1efac1ffb6
commit
65a25ad228
@ -153,22 +153,22 @@ public class FileManagerImpl implements FileManager {
|
||||
|
||||
@Override
|
||||
public FileManager setRootDir(Path rootDir) {
|
||||
this.rootDir = rootDir;
|
||||
return this;
|
||||
return this.newInstance(rootDir, this.path, this.autoCreateParent, this.disableRootDirCheck);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileManager setPath(Path path) {
|
||||
Path resolvedPath;
|
||||
if (this.disableRootDirCheck) {
|
||||
this.path = path;
|
||||
resolvedPath = path;
|
||||
} else {
|
||||
if (path.startsWith(this.rootDir)) {
|
||||
this.path = path;
|
||||
resolvedPath = path;
|
||||
} else {
|
||||
throw new IllegalArgumentException("path must be in rootDir");
|
||||
}
|
||||
}
|
||||
return this;
|
||||
return this.newInstance(this.rootDir, resolvedPath, this.autoCreateParent, this.disableRootDirCheck);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user