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

Merge pull request #14 from joecharamut/1.17.1

Fix drag-and-drop file uploading
This commit is contained in:
Merith 2021-10-31 12:45:18 -07:00 committed by GitHub
commit fa7a731ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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() );
}
}