summaryrefslogtreecommitdiff
path: root/metastore.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2007-05-20 11:36:53 +0200
committerDavid Härdeman <david@hardeman.nu>2007-05-20 11:36:53 +0200
commita53129d4b7a60b1fc29173accb5da5b74d2d16ba (patch)
treee45604a26f27e61285116c9c7dc30e87748d5891 /metastore.c
parentd8cf23b54d7c6e9883f6a823bde87f3ab3c844d0 (diff)
Fix chmod so that it actually works
Diffstat (limited to 'metastore.c')
-rw-r--r--metastore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/metastore.c b/metastore.c
index 733727d..4408cda 100644
--- a/metastore.c
+++ b/metastore.c
@@ -152,8 +152,8 @@ compare_fix(struct metaentry *real, struct metaentry *stored, int cmp)
if (cmp & DIFF_MODE) {
msg(MSG_NORMAL, "%s:\tchanging mode from 0%o to 0%o\n",
- real->path, real->mode, stored->mode);
- if (chmod(real->path, real->mode))
+ real->path, real->mode & 07777, stored->mode & 07777);
+ if (chmod(real->path, stored->mode & 07777))
msg(MSG_DEBUG, "\tchmod failed: %s\n", strerror(errno));
}