Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 18, 2025

We have a function called fix_potentially_long_windows_pathname which is used when unzipping archives under windows.

Without this the unzip process will fail if the total filename length ever exceeds 256. This change adds a test for installing deep in the filesystem (where pathnames exceed 256) and fixes a bug in this code which was causing the test to fail.

The fact that this code had this bug for god-known-how-long means I think nobody was depending on it, so we could probably just remove it, but maybe better to fix it and add this test?

@sbc100 sbc100 requested review from dschuff and juj December 18, 2025 21:28
@sbc100 sbc100 force-pushed the long_filename_test branch 7 times, most recently from 4474760 to bd71c72 Compare December 18, 2025 23:44
@sbc100 sbc100 force-pushed the long_filename_test branch 5 times, most recently from 7bfb777 to be035da Compare January 25, 2026 17:52
@sbc100 sbc100 changed the title Add a test for very-long-filename support. NFC Fix for window very-long-filename support. NFC Jan 25, 2026
@sbc100 sbc100 force-pushed the long_filename_test branch 3 times, most recently from 038eca5 to 8121253 Compare January 25, 2026 20:49
@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 25, 2026

I verified that with the fix_potentially_long_windows_pathname calls this new test fails with:

Unzipping file 'C:/Users/circleci/project/very_long_filename_indeedxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/downloads/node-v22.16.0-win-x64.zip' failed due to reason: [Errno 2] No such file or directory: 'C:\\Users\\circleci\\project\\very_long_filename_indeedxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\node\\unzip_temp\\node-v22.16.0-win-x64\\bin\\node_modules\\npm\\node_modules\\qrcode-terminal\\vendor\\QRCode\\QRErrorCorrectLevel.js'

@sbc100 sbc100 force-pushed the long_filename_test branch from 8121253 to 5e483cd Compare January 25, 2026 20:54
@sbc100 sbc100 merged commit 7783222 into main Jan 25, 2026
9 of 12 checks passed
@sbc100 sbc100 deleted the long_filename_test branch January 25, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants