Skip to content

Multiple fixes for path-related issues and other stuff... - #1419

Merged
Difegue merged 14 commits into
Difegue:devfrom
Guerra24:dev
Dec 16, 2025
Merged

Difegue merged 14 commits into
Difegue:devfrom
Guerra24:dev

Conversation

@Guerra24

@Guerra24 Guerra24 commented Nov 26, 2025 •

Copy link
Copy Markdown
Contributor

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
Comment thread lib/LANraragi/Model/Upload.pm Outdated
# 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
Copy Markdown
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.

Comment thread lib/LANraragi/Controller/Upload.pm Outdated
@Guerra24
Guerra24 force-pushed the dev branch 3 times, most recently from 746ee52 to 69638f0 Compare November 28, 2025 20:12
@Guerra24

Guerra24 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

Current state of the encoding issues in this pr:

Linux has working encoding in both api and web uploads, both match and behave the same during testing.

Windows has working encoding for web uploads. The api will process the files in the wrong encoding, but when they are moved into the content folder Shinobu automatically fixes the paths to the correct fs encoding. ID generation is not affected by the encoding and file operations continue to work.

I don't have leads or ideas or anything that could explain said behavior, I literally have no idea what the hell is going on. Previous to this I did not test the upload api so for all I know it might be completely broken in prod on Windows (Not that anyone is using it).

Up to you dfug if you want me to keep or remove the encoding changes.

@Difegue

Difegue commented Dec 16, 2025

Copy link
Copy Markdown
Owner

Given the test results I think this will work out ok for 95% of setups, and has the perk of cleaning up the old minion jank -- Let's try it out and see how it goes.

@Difegue
Difegue merged commit a01d4c3 into Difegue:dev Dec 16, 2025
3 checks passed
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