summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hstow-unstow-ignore1
-rwxr-xr-xbin/hstow5
2 files changed, 3 insertions, 3 deletions
diff --git a/.hstow-unstow-ignore b/.hstow-unstow-ignore
index 11fada0a..97fcddfc 100644
--- a/.hstow-unstow-ignore
+++ b/.hstow-unstow-ignore
@@ -4,7 +4,6 @@ Downloads
.emacs.d/eln-cache
.fmail
local
-.local/share/lxc
mnt
src
tmp
diff --git a/bin/hstow b/bin/hstow
index e54587e1..00cf5817 100755
--- a/bin/hstow
+++ b/bin/hstow
@@ -53,7 +53,7 @@ read_globs_file () {
}
dir_contents () {
- ( cd "$1"; find . ! -name . ! -name "$cchars" 2>/dev/null )
+ ( cd "$1"; find . ! -name . ! -name "$cchars" -print -prune )
}
fail () {
@@ -140,7 +140,8 @@ unstow () {
dir_pat=".$(echo $DIR | cut -c$(echo $HOME | wc -m | tr -d ' ')-)/"
dirs_pat="$(echo "^($dir_pat$ignores)" | sed -e 's#\.#\\.#g')"
- for file in $(find . -type l ! -name . ! -name "$cchars" 2>/dev/null \
+ for file in $(find . ! \( -user "$(id -un)" -o -group "$(id -gn)" \) \
+ -prune -o -type l ! -name . ! -name "$cchars" -print \
| grep -Ev "$dirs_pat"); do
if readlink "$file" | grep -Eq '^(\.\./)*\.STOW/'"$NAME/"; then
rm "$file"