[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 287595a 420/495: Don't traverse symlinks when recu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 287595a 420/495: Don't traverse symlinks when recursing directories |
Date: |
Sat, 7 Aug 2021 09:06:00 -0400 (EDT) |
branch: elpa/go-mode
commit 287595a375388cce16ecd8f44b44008e7679bc59
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>
Don't traverse symlinks when recursing directories
A symlink pointing to its containing directory would lead to an
infinite loop. A symlink pointing outside the parent directory could
potentially yield "subdirectories" that aren't sub.
There are some correctness concerns with simply ignoring symlinks, but
they're all offset by other circumstances: for one, the go tool itself isn't
very fond of symlinks. Second, the only consumer of go--directory-dirs is
go-packages-native, which in the presence of modules and the way
modern Go caches build artifacts doesn't work reliably, anyway.
As such, just making sure that we avoid infinite recursion, at the
cost of maybe missing some packages in bizarre setups, beats coming up
with a much more convoluted solution. We never intended to walk
symlinks in the first place.
---
go-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/go-mode.el b/go-mode.el
index ed7ca11..073cd22 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1382,7 +1382,8 @@ If IGNORE-CASE is non-nil, the comparison is
case-insensitive."
(dolist (file files)
(unless (member file '("." ".."))
(let ((file (concat dir "/" file)))
- (if (file-directory-p file)
+ (if (and (file-directory-p file)
+ (not (file-symlink-p file)))
(setq dirs (append (cons file
(go--directory-dirs file))
dirs))))))
- [nongnu] elpa/go-mode 0604054 388/495: cmd/gorename: emacs: do not auto shrink error window, (continued)
- [nongnu] elpa/go-mode 0604054 388/495: cmd/gorename: emacs: do not auto shrink error window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1b85887 389/495: refactor/rename: require cl-lib, use cl- namespace, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8144ae8 392/495: Merge commit '12ef34c', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 269eb01 398/495: Remove support for Emacs 23, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5056b85 403/495: Use xref functions if available, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3f02a16 406/495: Add go-guru-definition-other-window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7eb5b3d 409/495: Delete go-mode-autoloads.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2d1d33a 407/495: Fix off-by-one in point calculations, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7f87c32 416/495: Permit empty guru scope, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode be9186c 417/495: Support remote files in `gofmt', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 287595a 420/495: Don't traverse symlinks when recursing directories,
ELPA Syncer <=
- [nongnu] elpa/go-mode b990645 425/495: Fix call expr indenting after dangling operator., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ac6dd8c 430/495: Fix go-remove-unused-imports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e8674fe 437/495: Expand electric indent config a bit, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6a64cbf 439/495: Fix indentation for composite literal keys., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fb1272c 441/495: indent: fix performance in giant comments, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c020e2c 456/495: Fontify type names in more places., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2a1584f 454/495: Readme: add note recommending goimports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 57becfb 460/495: Fontify type names in interface declarations, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode cf53daa 459/495: Fix indentation in naked blocks., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f872781 466/495: Fontify variable names., ELPA Syncer, 2021/08/07