diff options
| author | Sebastian Schuberth <sschuberth@gmail.com> | 2011-06-10 13:56:24 +0200 |
|---|---|---|
| committer | Sebastian Schuberth <sschuberth@gmail.com> | 2011-06-10 13:56:24 +0200 |
| commit | c1802641ff398d11396d6187a3972622b2ff8ba6 (patch) | |
| tree | f32ee2d1be11c00f984a516797d06e91802fee96 /src/index.c | |
| parent | 535ff384e2afe029147b89b95c9fb812c955cd7b (diff) | |
| download | libgit2-c1802641ff398d11396d6187a3972622b2ff8ba6.tar.gz | |
Prefer to use file mode defines instead of raw numbers
Diffstat (limited to 'src/index.c')
| -rw-r--r-- | src/index.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.c b/src/index.c index 60b65848d..08e24906c 100644 --- a/src/index.c +++ b/src/index.c @@ -142,8 +142,8 @@ unsigned int index_create_mode(unsigned int mode) { if (S_ISLNK(mode)) return S_IFLNK; - if (S_ISDIR(mode) || (mode & S_IFMT) == 0160000) - return 0160000; + if (S_ISDIR(mode) || (mode & S_IFMT) == (S_IFLNK | S_IFDIR)) + return (S_IFLNK | S_IFDIR); return S_IFREG | ((mode & 0100) ? 0755 : 0644); } |
