Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qbt started concatenating absolute path in 'mapped_files' with 'save_path' #21870

Open
j1warren opened this issue Nov 18, 2024 · 4 comments
Open

Comments

@j1warren
Copy link
Contributor

qBittorrent & operating system versions

Moved from Ubuntu 22.04 to 24.04, qbt changed version:
22.04: 4.4.1
24.04: 4.6.3

What is the problem?

I have lots of torrents with following fields (artefact from moving from uTorrent long ago)

save_path: /home/torrents/
mapped_files: /home/torrents/somefile.zip

4.4.1 qbt worked fine with such torrents. But after upgrade to 4.6.3 it doesn't 'Open containing folder' or 'Preview file...' in them with double-click.

Errors:

gio: file:///home/torrents/home/torrents: Error when getting information for file “/home/torrents/home/torrents”: No such file or directory

gio: file:///home/torrents/home/torrents/somefile.mkv: Error when getting information for file “/home/torrents/home/torrents/somefile.mkv”: No such file or directory

What commit affected it, and is it possible to fix this, comparing the first char of mapped_files with '/'?

Steps to reproduce

No response

Additional context

No response

Log(s) & preferences file(s)

n/a

@qBittUser
Copy link

Can you reproduce with newer qBittorrent versions v4.6.7 / v5.0.2?

@j1warren
Copy link
Contributor Author

j1warren commented Nov 18, 2024

@qBittUser
Confirmed on the latest version from ppa. It prepends save_path when opening dir or folder, even when mapped_files is of absolute path
1:4.6.7.99~202411110115-8155-91943e481~ubuntu24.04.1

@j1warren
Copy link
Contributor Author

might this be it?
https://github.com/qbittorrent/qBittorrent/blob/v4_4_x/src/base/bittorrent/torrentimpl.cpp

    if (filesCount() == 1)
        return QDir(actualStorageLocation()).absoluteFilePath(filePath(0));
    if (filesCount() == 1)
        return (actualStorageLocation() / filePath(0));

from dd1bd8a

@sledgehammer999
Copy link
Member

FYI, we have an official PPA that provides v4.6.7. And our official AppImage provides v5.0.2.

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

No branches or pull requests

3 participants