Skip to content

Conversation

@Guerra24
Copy link
Contributor

@Guerra24 Guerra24 commented Nov 26, 2025

Win32::FileSystemHelper diff

@Guerra24 Guerra24 marked this pull request as ready for review November 28, 2025 07:21
@Guerra24 Guerra24 marked this pull request as draft November 28, 2025 07:35
@Guerra24 Guerra24 marked this pull request as ready for review November 28, 2025 07:44
# Add the file to the database ourselves so Shinobu doesn't do it
# This allows autoplugin to be ran ASAP.
my $name = add_archive_to_redis( $id, $output_file, $redis, $redis_search );
my $name = add_archive_to_redis( $id, redis_encode( redis_decode( $output_file ) ), $redis, $redis_search );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm quite wary of this PR making changes to effectively store encoded filenames in Redis instead of raw bytes from the FS - Historically not using the exact filepaths the host filesystem caused a ton of issues on systems with weird locales.

$tempdir
);

my $mojo_temp = tmpnam(); # Create another temp file as a target for Mojo's move_to so that the original handle can be closed
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a glance I'm not sure which problem this solves so it probably at least needs more commenting 🤔

What does the original handle mentioned here belong to -- The mojo $file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add them but the tl;dr is that mojo holds an open handle to the file blocking it from being moved on Windows. Yes, the $file object holds it.

@Guerra24 Guerra24 force-pushed the dev branch 3 times, most recently from 746ee52 to 69638f0 Compare November 28, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants