bottlesdevs / Bottles

Run Windows software and games on Linux
https://usebottles.com
GNU General Public License v3.0
6.44k stars 272 forks source link

[Bug]: Open file with .desktop of program in Bottles #3504

Open Damglador opened 1 month ago

Damglador commented 1 month ago

Describe the bug

Right-clicking on a file and opening it with some program in a Bottles passes a parameter as I understand. But here is a problem, opening a file in /home/user for example works fine, but if a file name of path to it contains any spaces, it doesn't register it as a full path.

I tried it with dnSpy and UndertaleModTool, example will be with UMT. Basically opening a file in /home/user/ROR/ works Opening a file in/home/user/ROR ROR/ doesn't

I'll attach screenshots from dnSpy

To Reproduce

  1. Get a file-opening program
  2. Create .desktop for it in Bottles
  3. Find a file that it can open
  4. Rename it to contain spaces or throw it in a folder with spaces in name
  5. Open the file with the program's .desktop file
  6. Try the same thing, but without spaces in path to the file

Package

Flatpak from Flathub

Distribution

Arch

Debugging Information

Official Package: false
Version: '51.13'
DE/WM: plasma
Display:
    X.org: true
    X.org (port): :1
    Wayland: true
Graphics:
    vendors:
        intel:
            vendor: intel
            envs:
                DRI_PRIME: '1'
            icd: /usr/share/vulkan/icd.d/intel_hasvk_icd.x86_64.json:/usr/share/vulkan/icd.d/intel_icd.x86_64.json
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.10.10-arch1-1
Disk:
    Total: 467086725120
    Free: 204415954944
RAM:
    MemTotal: 31.1GiB
    MemAvailable: 3.7GiB
Bottles_envs: null
Tools and Libraries:
    cabextract: true
    p7zip: true
    patool: true
    glibc_min: '2.40'
    icoextract: true
    pefile: true
    orjson: true
    markdown: true
    ImageMagick: true
    FVS: true
    xdpyinfo: true

Troubleshooting Logs

No response

Additional context

зображення зображення зображення Real file path is: /home/damglador/Ror roring/GMIni.dll

Damglador commented 1 month ago

So I tried this in CLI. Using \ on spaces solves the issue, but it's impossible to do if I want to use it with right click. bottles-cli run -p dnSpy -b 'Programs' -- "/home/damglador/Ror\ roring/GMIni.dll"