digint / btrbk

Tool for creating snapshots and remote backups of btrfs subvolumes
https://digint.ch/btrbk/
GNU General Public License v3.0
1.71k stars 123 forks source link

btrbk cannot parse `/proc/self/mountinfo` if a mount contains space(s) #563

Open alterNERDtive opened 1 year ago

alterNERDtive commented 1 year ago

I guess technically it could also be the spaces in the path, but I do hope that’s not it ;)

ERROR: Failed to parse "/proc/self/mountinfo"
Offending line: 289 45 0:173 / /home/xxx/.local/share/Steam/steamapps/common/Baldurs\040Gate\0403 rw,relatime shared:232 - overlay overlayfs rw,seclabel,lowerdir=/home/xxx/.local/share/Steam/steamapps/compatdata/1086940/pfx/drive_c/users/steamuser/AppData/Local/Larian Studios/current/override:/home/xxx/.local/share/Steam/steamapps/common/bg3base,upperdir=/tmp/bg3/upper,workdir=/tmp/bg3/work
chenxiaolong commented 1 year ago

I think it's indeed because of the spaces in the last component of the line:

rw,seclabel,lowerdir=/home/xxx/.local/share/Steam/steamapps/compatdata/1086940/pfx/drive_c/users/steamuser/AppData/Local/Larian Studios/current/override:/home/xxx/.local/share/Steam/steamapps/common/bg3base,upperdir=/tmp/bg3/upper,workdir=/tmp/bg3/work

The code seems to be expect that the field contains no spaces (\S+):

https://github.com/digint/btrbk/blob/18ddc659790de489967c2c82213fb5fba7955d40/btrbk#L1883

alterNERDtive commented 1 year ago

Thanks for checking. Didn’t have the time for it when I reported, but figured it’d be better to file the bug as-is than forget to do it later 😬

(case in point: forgot to check later)