elementary/settings-screentime-limits

PATH in error message different

开放

#154 创建于 2021年10月10日

 (3 条评论) (0 个反应) (0 位负责人)Vala (13 个派生)auto 404
Good First IssuePriority: Low

仓库指标

星标
 (14 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

What Happened?

I try to build the package so that the config. is saved to /var/lib, because on NixOS /etc is only writable by NixOS itself.

I set the meson flag -Dsysconfdir=var/lib.

I get the runtime issue:

Oct 10 12:50:26 gaming systemd[1]: Starting Pantheon Screen Time & Limits Daemon...
Oct 10 12:50:26 gaming pantheon-parent[95630]: UserConfig.vala:76: Could not find daemon config file: /var/lib/pantheon-parental-controls/daemon.conf does not exist
Oct 10 12:50:26 gaming pantheon-parent[95630]: UserConfig.vala:167: Failed to create file “var/lib/pantheon-parental-controls/daemon.conf.UY40A1”: No such file or directory
Oct 10 12:50:26 gaming systemd[1]: Started Pantheon Screen Time & Limits Daemon.

And here is the issue. From the code, both paths (Constants.DAEMON_CONF_FILE) should be the same, but they are printed differently.

I think it's because file.get_path is used here:

https://github.com/elementary/switchboard-plug-parental-controls/blob/49355a30710be1d84e9241fd7b59e1e2d17a38ba/src/daemon/UserConfig.vala#L76

but not here:

https://github.com/elementary/switchboard-plug-parental-controls/blob/49355a30710be1d84e9241fd7b59e1e2d17a38ba/src/daemon/UserConfig.vala#L167

Having the correct output would make debugging the build way more easy.

Steps to Reproduce

  1. Build with meson flag -Dsysconfdir=var/lib
  2. Run
  3. See error

Expected Behavior

Error messages should show the actual path.

OS Version

Other Linux

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

贡献者指南