Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving configuration does not work if profrc is a symbolic link #1362

Closed
LeSpocky opened this issue Jun 12, 2020 · 2 comments
Closed

Saving configuration does not work if profrc is a symbolic link #1362

LeSpocky opened this issue Jun 12, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@LeSpocky
Copy link

Expected Behavior

After changing some configuration value, the change should be committed to the configuration file (profrc).

Current Behavior

Reading the configuration from ~/.config/profanity/profrc works, but when typing /save changed values are not stored.

Steps to Reproduce (for bugs)

  1. move the real configuration file somewhere else
  2. create a symbolic link on that file: ln -s <path-to-real>/profrc ~/.config/profanity/profrc
  3. start profanity
  4. change some config, e.g. /time console set "%T"
  5. save changes with /save
  6. check to contents of profrc

Context

I have my config managed by GNU stow, which creates symlinks into a Git repo outside of ~/.confighttps://github.com/LeSpocky/dotfiles

Environment

  • version is 0.9.1-1 from Debian GNU/Linux (recent unstable/sid), self built from Debian package source
  • glib version is 2.58.3-2+deb10 from Debian stable/buster

strace output

poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
write(1, "\33[J", 3)                    = 3
write(3, "12/06/2020 17:32:22: prof: INF: Saving preferences to configuration file\n", 73) = 73
lseek(3, 0, SEEK_CUR)                   = 284699
readlink("/etc/localtime", "/usr/share/zoneinfo/Europe/Berlin", 256) = 33
openat(AT_FDCWD, "/etc/localtime", O_RDONLY) = 14
fstat(14, {st_mode=S_IFREG|0644, st_size=2335, ...}) = 0
mmap(NULL, 2335, PROT_READ, MAP_PRIVATE, 14, 0) = 0x7f97a4de6000  
close(14)                               = 0
munmap(0x7f97a4de6000, 2335)            = 0
lstat("/home/alex/.config/profanity/profrc", {st_mode=S_IFLNK|0777, st_size=50, ...}) = 0
readlink("/home/alex/.config/profanity/profrc", "../../.dotfiles/profanity/.config/profanity/profrc"
openat(AT_FDCWD, "profrc../../.dotfiles/profanity/.config/profanity/profrc.3JV7L0", O_RDWR|O_CREAT|O
chmod("/home/alex/.config/profanity/profrc", 0600) = 0
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
write(1, "\33[22d", 5)                  = 5
write(1, "17:32:22 - Saving preferences.\r\33[37d", 36) = 36
recvmsg(10, {msg_namelen=0}, 0)         = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
poll([{fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 3, 0) = 0 (Timeout)
read(4, 0x558f25dc3490, 4000)           = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
select(1024, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
poll([{fd=0, events=POLLIN}], 1, 0)     = 0 (Timeout)
recvmsg(10, {msg_namelen=0}, 0)         = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
poll([{fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 3, 0) = 0 (Timeout)
read(4, 0x558f25dc3490, 4000)           = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)
@jubalh jubalh self-assigned this Jun 12, 2020
@jubalh jubalh added the bug label Jun 12, 2020
@jubalh jubalh added this to the 0.9.2 milestone Jun 12, 2020
@jubalh jubalh closed this as completed in 914c675 Jun 13, 2020
@jubalh
Copy link
Member

jubalh commented Jun 13, 2020

@LeSpocky can you please test latest master and give feedback whether it works for you?
If all is fine we will release 0.9.2.

@LeSpocky
Copy link
Author

Tested-by: Alexander Dahl post@lespocky.de

👍

LeSpocky added a commit to LeSpocky/dotfiles that referenced this issue Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants