1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-28 00:12:16 +00:00

Fix drag-and-drop file uploading

This commit is contained in:
Joseph Charamut 2021-10-31 10:55:50 -04:00
parent 9f2e43f00a
commit 8be48ebcf0
2 changed files with 1 additions and 2 deletions

View File

@ -117,8 +117,6 @@ public abstract class ComputerScreenBase<T extends ContainerComputerBase> extend
@Override
public void filesDragged( @Nonnull List<Path> files )
{
// TODO: this thing doesn't work in Tweaked at this moment
if ( true ) return;
if( files.isEmpty() ) return;
if( computer == null || !computer.isOn() )

View File

@ -213,6 +213,7 @@ public abstract class ContainerComputerBase extends ScreenHandler implements ICo
{
try( FileSystemWrapper<WritableByteChannel> channel = fs.openForWrite( file.getName(), false, Function.identity() ) )
{
file.getBytes().rewind();
channel.get().write( file.getBytes() );
}
}