Firstbober / wapanel

Desktop-dedicated wayland bar for wayfire and other wlroots based compositors. Mir compatible.
https://firstbober.github.io/wapanel/
MIT License
55 stars 4 forks source link

filesystem_error: No such file ../share/wapanel/wapanel.toml #25

Closed tim77 closed 3 years ago

tim77 commented 3 years ago

Segfault after first run wapanel due to missconfigure path for wapanel.toml file.

[wapanel] [INFO] (../src/main.cc:193): Started wapanel version 1.0.0
[wapanel] [INFO] (../src/config.cc:41): Checking if config file './wapanel.toml' exists
[wapanel] [INFO] (../src/config.cc:51): File not found
[wapanel] [INFO] (../src/config.cc:41): Checking if config file '/home/user/.config/wapanel/wapanel.toml' exists
[wapanel] [INFO] (../src/config.cc:51): File not found
[wapanel] [PERR] (../src/config.cc:55): Didn't found any config file!
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
  what():  filesystem error: cannot copy file: No such file or directory [../share/wapanel/wapanel.toml] [/home/user/.config/wapanel/wapanel.toml]

We need to fix prefix path looking for wapanel.toml since most of time and canonical path is:

/usr/share/wapanel/wapanel.toml
Firstbober commented 3 years ago

Fixed in 00b3b1e. Now should work fine.

tim77 commented 3 years ago

@Firstbober thanks. Seems like we also need to unhardcode lib path. Currently applets will not work since they are installed into /usr/lib but must into /usr/lib64 on 64-bit system.

Firstbober commented 3 years ago

Ah, I changed lib path in code but forgot in meson, I will fix it asap.

Firstbober commented 3 years ago

0508e7e should do the job.