Fix drag-and-drop file uploading

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

No files matched your search

@@ -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() )
@@ -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() );
}
}