bottlesdevs / Bottles

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

[Bug]: Creating a Bottle creates useless symlinks in `$HOME/Documents` #2548

Open SuperSamus opened 1 year ago

SuperSamus commented 1 year ago

Describe the bug

During the creation of a Bottle, some symlinks are created in $HOME/Documents: they are named Downloads, Music, Pictures, Templates and Videos. They all point towards $HOME/Documents, making them affectively useless. I checked the source code, but I have no idea what's creating them (it's not this, I reproduced it with this code deleted).

This only happens during bottle creation, not when changing runner. If you are wondering, "Unlinked home directory" doesn't fix the issue. I'm not using Flatpak, nor sandbox. Didn't test whether changing system language has a different behavior.

To Reproduce

  1. Open Bottles
  2. Create a bottle
  3. See issue by navigating to $HOME/Documents with your file manager

Package

Package from nixpkgs (which I have looked at)

Distribution

NixOS 23.05 Unstable

Troubleshooting Logs

Official Package: false
Version: '50.1'
DE/WM: /nix/store/5kxwa2jzh04r6zp8s1yn76j1rq33m7r7-desktops/share/wayland-sessions/plasmawayland
Display:
    X.org: true
    X.org (port): :1
    Wayland: true
Graphics:
    vendors:
        amd:
            vendor: amd
            envs:
                DRI_PRIME: '1'
            icd: /run/opengl-driver/share/vulkan/icd.d/amd_icd64.json:/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/amd_icd32.json:/run/opengl-driver-32/share/vulkan/icd.d/radeon_icd.i686.json
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.1.3-zen1
Disk:
    Total: 8016162816
    Free: 8016113664
RAM:
    MemTotal: 14.9GiB
    MemAvailable: 9.6GiB
Bottles_envs: null
Tools and Libraries:
    cabextract: true
    p7zip: true
    patool: true
    glibc_min: '2.35'
    icoextract: true
    pefile: true
    orjson: true
    markdown: true
    ImageMagick: true
    FVS: true
    xdpyinfo: true

Additional context

No response

Kinsteen commented 1 year ago

The problem comes from Wine-TKG, which Soda is based on, from this code: https://github.com/Frogging-Family/wine-tkg-git/blob/bcb3ba72a3c98eac7d04990590deaf101f3bc58e/wine-tkg-git/wine-tkg-patches/hotfixes/valve/de-steamify.mypatch#LL625C15-L625C15

I'm not exactly sure what it does, but this is the culprit. I don't think there's much we can do about it

swsnr commented 1 year ago

@Kinsteen I think this also breaks duplicating bottles: I just noticed that duplicating a certain bottle takes ages and copies and excessive amount of data (I cancelled when the new bottle reached ca. 20GB in size, as compared to 4.4 GB in the original bottle). It looks as if the duplication process copies these symlinks literally, i.e. effectively attempts to copy my entire home directory (something similar to #743 perhaps?).

Kinsteen commented 1 year ago

@swsnr This is fixed upstream, it's somewhat related to this

Docmine17 commented 1 year ago

The Same here Once my ssd ran out of space because bottles duplicated my entire home or something like that... because of this bug I avoid duplicating or creating snapshots.

Captura de tela de 2023-03-04 11-23-16 Captura de tela de 2023-03-04 11-23-28 image

Searching nautilus, these are the only symbolic links that exist inside (C:) image


⭐ Edit: Looks like bottle duplication is working correctly now, the symlinks remain as symlinks in the duplicated bottle, no files within the links were duplicated.