diff options
author | Bert <ber.t@gmx.com> | 2011-08-18 00:38:55 +0200 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-08-18 00:38:55 +0200 |
commit | ff013dd0092df247b2c9f1c550e03542581ed21d (patch) | |
tree | 572777f9576c65c63a6f520e3b8b5b85edf5d580 /image.c | |
parent | 2a3a9657d360a4952ef84aa4e8665f211d490321 (diff) |
Revised handling of file names & paths
Diffstat (limited to 'image.c')
-rw-r--r-- | image.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |