This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via ee2a7bf0f846b6283b0c3cab6acb7c5afb4ca93b (commit) from 3d1396ad2aa8763807e048d91cde205e764b237f (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/ee2a7bf0f846b6283b0c3cab6acb7c5afb4ca...
commit ee2a7bf0f846b6283b0c3cab6acb7c5afb4ca93b Author: Cyril Hrubis metan@ucw.cz Date: Sat Dec 29 11:38:51 2012 +0100
loaders: GP_Loader: Fix previous commit.
We need to do access() first then stat().
diff --git a/libs/loaders/GP_Loader.c b/libs/loaders/GP_Loader.c index 05b1240..c3769a6 100644 --- a/libs/loaders/GP_Loader.c +++ b/libs/loaders/GP_Loader.c @@ -234,16 +234,7 @@ GP_Context *GP_LoadImage(const char *src_path, GP_ProgressCallback *callback) { int saved_errno; struct stat st; - - if (stat(src_path, &st)) { - GP_WARN("Failed to stat '%s': %s", src_path, strerror(errno)); - } else { - if (st.st_mode & S_IFDIR) { - errno = EISDIR; - return NULL; - } - } - + if (access(src_path, R_OK)) { saved_errno = errno; @@ -256,6 +247,15 @@ GP_Context *GP_LoadImage(const char *src_path, GP_ProgressCallback *callback) return NULL; }
+ if (stat(src_path, &st)) { + GP_WARN("Failed to stat '%s': %s", src_path, strerror(errno)); + } else { + if (st.st_mode & S_IFDIR) { + errno = EISDIR; + return NULL; + } + } + GP_Context *img; const GP_Loader *ext_load = NULL, *sig_load;
-----------------------------------------------------------------------
Summary of changes: libs/loaders/GP_Loader.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.