mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-17 21:55:12 +00:00
Prevent copying folders inside themselves
- contains now performs a case-insensitive comparison. While this is a little dubious, it's required for systems like Windows, where foo and Foo are the same folder. - Impose a depth limit on copyRecursive. If there are any other cases where we may try to copy a folder into itself, this should prevent the computer entirely crashing.
This commit is contained in:
@@ -27,7 +27,7 @@ public class FileOperationException extends IOException
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public FileOperationException( String message )
|
||||
public FileOperationException( @Nonnull String message )
|
||||
{
|
||||
super( Objects.requireNonNull( message, "message cannot be null" ) );
|
||||
this.filename = null;
|
||||
|
||||
Reference in New Issue
Block a user