summaryrefslogtreecommitdiff
path: root/src/wallpaper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallpaper.c')
-rw-r--r--src/wallpaper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallpaper.c b/src/wallpaper.c
index 886beb6..b5945f0 100644
--- a/src/wallpaper.c
+++ b/src/wallpaper.c
@@ -310,6 +310,8 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
if (fil && !use_filelist) {
filbuf[out++] = '\'';
+ fil = feh_absolute_path(fil);
+
for (in = 0; fil[in] && out < 4092; in++) {
if (fil[in] == '\'')
@@ -317,12 +319,13 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
filbuf[out++] = fil[in];
}
filbuf[out++] = '\'';
+ free(fil);
} else {
for (l = filelist; l && out < 4092; l = l->next) {
filbuf[out++] = '\'';
- fil = FEH_FILE(l->data)->filename;
+ fil = feh_absolute_path(FEH_FILE(l->data)->filename);
for (in = 0; fil[in] && out < 4092; in++) {
@@ -332,6 +335,7 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
}
filbuf[out++] = '\'';
filbuf[out++] = ' ';
+ free(fil);
}
}