Skip to content

[Bug] --restore-to flag unexpected behavior #27

@Ezall2001

Description

@Ezall2001

Describe the bug
using the --restore-to flag with both gtrash restore and gtrash find results in creating all of the intermediate path segments in the restore-to path

example: gtrash restore home/user/A/B/file --restore-to home/user/C
result: file is restored to home/user/C/home/user/A/B/file
expected: file restored to home/user/C/file

Version (please complete the following information):
gtrash:
version: (devel)
commit: unknown
buildDate: unknown
builtBy: unknown

os:
kernel-name: Linux
nodename: asus-arch
kernel-release: 6.18.1-arch1-2
kernel-version: #1 SMP PREEMPT_DYNAMIC Sat, 13 Dec 2025 18:23:21 +0000
machine: x86_64
operating-system: GNU/Linux

Additional context
This is consistent across shells. I tried it with nushell (my default shell) and with bash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions