diff --git a/rejmerge.8.in b/rejmerge.8.in index cc05c4c..7fc5361 100644 --- a/rejmerge.8.in +++ b/rejmerge.8.in @@ -73,6 +73,6 @@ Directory where rejected files are stored. .SH SEE ALSO pkgadd(8), pkgrm(8), pkginfo(8), pkgmk(8) .SH COPYRIGHT -rejmerge (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2010 CRUX team (http://crux.nu). +rejmerge (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2012 CRUX team (http://crux.nu). rejmerge (pkgutils) is licensed through the GNU General Public License. Read the COPYING file for the complete license. diff --git a/rejmerge.in b/rejmerge.in index d6b479a..ccc3b3a 100755 --- a/rejmerge.in +++ b/rejmerge.in @@ -3,7 +3,7 @@ # rejmerge (pkgutils) # # Copyright (c) 2000-2005 Per Liden -# Copyright (c) 2006-2010 by CRUX team (http://crux.nu) +# Copyright (c) 2006-2012 by CRUX team (http://crux.nu) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -284,6 +284,23 @@ main() { fi done + # Check permissions of directories + for DIR in $(find $REJECTED_DIR -depth -type d); do + + local INSTALLED_DIR="${DIR##$REJECTED_DIR}" + + if [ -d "$INSTALLED_DIR" -a -d $DIR ]; then + + local STAT_DIR1=$(stat -c '%A %U %G' "$INSTALLED_DIR") + local STAT_DIR2=$(stat -c '%A %U %G' "$DIR") + + if [ "$STAT_DIR1" != "$STAT_DIR2" ]; then + REJECTED_FILES_FOUND="yes" + permissions_menu "$INSTALLED_DIR" "$DIR" + fi + fi + done + # Remove empty directories for DIR in $(find $REJECTED_DIR -depth -type d); do if [ "$DIR" != "$REJECTED_DIR" ]; then