aboutsummaryrefslogtreecommitdiff
path: root/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'image.c')
-rw-r--r--image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/image.c b/image.c
index c9e53de..75fe989 100644
--- a/image.c
+++ b/image.c
@@ -50,12 +50,12 @@ void img_init(img_t *img, win_t *win) {
}
}
-int img_load(img_t *img, const char *filename) {
- if (!img || !filename)
+int img_load(img_t *img, const fileinfo_t *file) {
+ if (!img || !file || !file->name || !file->path)
return 0;
- if (access(filename, R_OK) || !(img->im = imlib_load_image(filename))) {
- warn("could not open image: %s", filename);
+ if (access(file->path, R_OK) || !(img->im = imlib_load_image(file->path))) {
+ warn("could not open image: %s", file->name);
return 0;
}