From ff013dd0092df247b2c9f1c550e03542581ed21d Mon Sep 17 00:00:00 2001 From: Bert Date: Thu, 18 Aug 2011 00:38:55 +0200 Subject: Revised handling of file names & paths --- image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'image.c') 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; } -- cgit v1.2.3