Port the path resolution and config loading code from -next.

This commit is contained in:
Fernando Tarlá Cardoso Lemos
2010-11-14 22:54:40 -02:00
committed by Michael Stapelberg
parent c0c7d04264
commit bfa12a5819
5 changed files with 47 additions and 39 deletions

View File

@ -485,7 +485,7 @@ void store_restart_layout() {
unsigned int length;
y(get_buf, &payload, &length);
char *globbed = glob_path("~/.i3/_restart.json");
char *globbed = resolve_tilde("~/.i3/_restart.json");
int fd = open(globbed, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
free(globbed);
if (fd == -1) {