Page MenuHome GnuPG

Kleopatra fails to decrypt/extract archives located at very long file paths
Closed, ResolvedPublic

Description

This seems to be the problem reported in r#31768

I can reproduce this e.g. when trying to decrypt z:/15_ThisIsAveryLongFolderName_1/15_ThisIsAveryLongFolderName/14_ThisIsAveryLongFolderName/13_ThisIsAveryLongFolderName/12_ThisIsAveryLongFolderName/11_ThisIsAveryLongFolderName/10_ThisIsAveryLongFolderName/9_ThisIsAveryLongFolderName/15_ThisIsAveryLongFolderName_1.tar.gpg

Decrypting works fine when starting it using the Decrypt/Verify action in kleopatra, but fails when starting it by opening the encrypted archive in the windows file explorer.
In the broken case (when starting it from the windows file explorer), the path passed to kleopatra starts with \\?\ (see windows docs). In the working case, the path does not have this. This seems to be the relevant difference; if i remove the \\?\ from the path in kleopatra, decryption starts working fine. (I don't know whether that is a useful fix, though).

GpgME also breaks the \\?\, since it replaces all backslashes with forward slashes on windows, but fixing that doesn't seem to make decryption work, so there has to be something else going wrong somewhere

Event Timeline

TobiasFella created this task.
TobiasFella set External Link to https://invent.kde.org/pim/kleopatra/-/merge_requests/370.
TobiasFella moved this task from Backlog to WIP on the gpd5x board.
TobiasFella changed the task status from Open to Testing.Mar 11 2025, 1:24 PM
ikloecker added a subscriber: ikloecker.

Backported for VSD 3.3.x / Gpg4win 4.4.x

ebo edited projects, added vsd33 (vsd-3.3.1); removed vsd33.
ebo moved this task from WIP to Done on the gpd5x board.
ebo added a subscriber: ebo.

Well, I could not reproduce this at any time but tested decryption with long file paths to be sure nothing broke and it worked fine.

So I'll call this resolved.