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