Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Bug]: The placeholder folder in ~/.var is not being deleted after I delete a bottle created in a custom directory

Open moonlitpath opened this issue 8 months ago • 1 comments

Describe the bug

When I create a bottle in a custom directory, Bottles also creates a folder with the same name in ~/.var/app/com.usebottles.bottles/data/bottles/bottles/, which contains a placeholder.yml file. When I delete this bottle, Bottles removes placeholder.yml; however, the folder it was in is not deleted. This prevents the creation of bottles with the same name in the future because Bottles shows an error: "Unable to create Bottle. Failed to create placeholder directory/file."

To Reproduce

  1. Create a bottle, choose any Bottle Directory other than "Default" (give Bottles appropriate permissions if necessary)
  2. In the bottle's details, click "Delete Bottle" from the hamburger menu
  3. Create a bottle with the same name in the same directory

Package

Flatpak from Flathub

Distribution

Fedora Silverblue 42

Debugging Information

Official Package: true
Version: '51.21'
DE/WM: gnome
Display:
    X.org: true
    X.org (port): :0
    Wayland: true
Graphics:
    vendors:
        amd:
            vendor: amd
            envs:
                DRI_PRIME: '1'
            icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.14.6-300.fc42.x86_64
Disk:
    Total: 8353452032
    Free: 8353288192
RAM:
    MemTotal: 15.6GiB
    MemAvailable: 12.8GiB
Bottles_envs: null

Troubleshooting Logs


Additional context

No response

moonlitpath avatar May 20 '25 05:05 moonlitpath

Haha this is amazing, I came here to report the exact same bug. I am using the latest Bottles Flatpak and saw the exact same issue:

  • I created this bottle: /mnt/media_storage/Games/Bottles/Prefixes/Star-Citizen
  • ~/.var/app/com.usebottles.bottles/data/bottles/bottles/Star-Citizen was also created. It contains a placeholder file with the full path to the actual wineprefix location.
  • I deleted the custom bottle inside Bottles GUI because I made a mistake with the path.
  • Tried to make another and got the error about (ERROR) Failed to create placeholder directory/file at: /home/x/.var/app/com.usebottles.bottles/data/bottles/bottles/Star-Citizen
  • Saw that the directory existed. So I deleted it manually and tried again. Now it worked.

So yeah there's an incomplete cleanup when deleting bottles.

Arcitec avatar May 24 '25 04:05 Arcitec