Home GnuPG

Fix decrypting files with very long paths on windows

Description

Fix decrypting files with very long paths on windows

Windows doesn't like very long file paths (< ~250 characters).
When decrypting files stored under such a long file path by clicking on it in the windows explorer, kleopatra fails to decrypt it.
When starting the decryption from within kleopatra, decryption works fine.

In the first case, windows passes us a file path starting with "\\?\", which is supposed to remove file length limitations,
but this doesn't work for us for reasons I don't fully know.

Removing the "\\?\" fixes the problem - even for all cases of very long file paths that i could come up with.

(cherry picked from commit 691c4afa683e000f384c72d7dc8d72ccfd4bc25a)

Details

Provenance
TobiasFellaAuthored on Fri, Feb 28, 11:57 AM
ikloeckerCommitted on Tue, Mar 11, 3:37 PM
Parents
rKLEOPATRAebbdaf8f576a: importcertificatescommand: Fix i18n call
Branches
Unknown
Tags
Unknown
References
gpg4win/24.05
Tasks
T7532: Kleopatra fails to decrypt/extract archives located at very long file paths