mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-28 04:17:38 +00:00
Fix a couple of issues with FileSystemMounts
- Only generate resource pack mounts if the desired directory exists. - Allow mounting files, as well as directories (fixes #90). As always, also a wee bit of cleanup to some of the surrounding code.
This commit is contained in:
@@ -39,7 +39,10 @@ public interface IComputerAccess
|
||||
* @see IMount
|
||||
*/
|
||||
@Nullable
|
||||
String mount( @Nonnull String desiredLocation, @Nonnull IMount mount );
|
||||
default String mount( @Nonnull String desiredLocation, @Nonnull IMount mount )
|
||||
{
|
||||
return mount( desiredLocation, mount, getAttachmentName() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Mount a mount onto the computer's file system in a read only mode.
|
||||
@@ -75,7 +78,10 @@ public interface IComputerAccess
|
||||
* @see IMount
|
||||
*/
|
||||
@Nullable
|
||||
String mountWritable( @Nonnull String desiredLocation, @Nonnull IWritableMount mount );
|
||||
default String mountWritable( @Nonnull String desiredLocation, @Nonnull IWritableMount mount )
|
||||
{
|
||||
return mountWritable( desiredLocation, mount, getAttachmentName() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Mount a mount onto the computer's file system in a writable mode.
|
||||
|
||||
Reference in New Issue
Block a user