From 98bb144e711a891880c8d7de4ffbe25e25faf4ca Mon Sep 17 00:00:00 2001 From: Frederik Elwert Date: Fri, 13 Sep 2024 09:30:01 +0200 Subject: [PATCH 1/2] Fix symbolic link handling in pelican-themes -s/-c --- RELEASE.md | 3 +++ pelican/tools/pelican_themes.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..8a0602e89 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: minor + +Fix symlink handling in `pelican-themes`. diff --git a/pelican/tools/pelican_themes.py b/pelican/tools/pelican_themes.py index fa59b8fdc..4d8cee2d1 100755 --- a/pelican/tools/pelican_themes.py +++ b/pelican/tools/pelican_themes.py @@ -249,6 +249,7 @@ def install(path, v=False, u=False): def symlink(path, v=False): """Symbolically link a theme""" + path = os.path.realpath(path) if not os.path.exists(path): err(path + " : no such file or directory") elif not os.path.isdir(path): @@ -269,7 +270,7 @@ def symlink(path, v=False): def is_broken_link(path): """Returns True if the path given as is a broken symlink""" - path = os.readlink(path) + path = os.path.realpath(path) return not os.path.exists(path) From e316fb6967a4068c7954b11b6e03fdf37347730b Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Sat, 28 Sep 2024 18:52:03 +0200 Subject: [PATCH 2/2] Delete RELEASE.md --- RELEASE.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index 8a0602e89..000000000 --- a/RELEASE.md +++ /dev/null @@ -1,3 +0,0 @@ -Release type: minor - -Fix symlink handling in `pelican-themes`.