Don't force loopy local symlinks if we've already linked a parent.
[dotfiles-framework.git] / dotfiles.sh
index 907fbe2ffe82c587891c887be2b3b7459e79ff19..54ce7a324e3c79c12750dd56155ceb71bed1afd4 100755 (executable)
@@ -592,6 +592,9 @@ function link()
                        if [ "${FORCE_LINK}" = 'no' ]; then
                                # don't prompt about --force-link, because this will happen a lot
                                continue  # already simlinked
+                       elif [ ! -h "${TARGET}/${FILE}" ]; then
+                               # target file/dir underneath an already symlinked dir
+                               continue
                        else
                                # don't backup links that already point to the right place
                                BACKUP='no'