mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
Properly erroring on ".." as path to FS methods. Closes #1708.
This commit is contained in:
parent
9bb3fae8d3
commit
0c0880d836
@ -320,7 +320,7 @@ class FileSystem(val fileSystem: IFileSystem, var label: Label, val host: Option
|
||||
|
||||
private def clean(path: String) = {
|
||||
val result = com.google.common.io.Files.simplifyPath(path)
|
||||
if (result.startsWith("../")) throw new FileNotFoundException(path)
|
||||
if (result.startsWith("../") || result == "..") throw new FileNotFoundException(path)
|
||||
if (result == "/" || result == ".") ""
|
||||
else result
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user