summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-19 16:10:11 -0700
committerRussell Belfer <arrbee@arrbee.com>2012-03-19 16:10:11 -0700
commit7c7ff7d11e2d22f7b9c7f8152f5c58dde37ac207 (patch)
tree838380af916490eb68e3004bc3ec10cc7ac8cf1f /src/fileops.c
parentfd7714273cb9646d63f4da8d81450a0f9f9295f5 (diff)
downloadlibgit2-7c7ff7d11e2d22f7b9c7f8152f5c58dde37ac207.tar.gz
Migrate index, oid, and utils to new errors
This includes a few cleanups that came up while converting these files. This commit introduces a could new git error classes, including the catchall class: GITERR_INVALID which I'm using as the class for invalid and out of range values which are detected at too low a level of library to use a higher level classification. For example, an overflow error in parsing an integer or a bad letter in parsing an OID string would generate an error in this class.
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 65942adf5..f1f820ab7 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -108,10 +108,10 @@ mode_t git_futils_canonical_mode(mode_t raw_mode)
return S_IFREG | GIT_CANONICAL_PERMS(raw_mode);
else if (S_ISLNK(raw_mode))
return S_IFLNK;
- else if (S_ISDIR(raw_mode))
- return S_IFDIR;
else if (S_ISGITLINK(raw_mode))
return S_IFGITLINK;
+ else if (S_ISDIR(raw_mode))
+ return S_IFDIR;
else
return 0;
}