This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 23c22c0d Does the symlink exist?
23c22c0d is described below
commit 23c22c0d3d373e8c92a1c4882b1b5fd063f828ea
Author: Sebb <[email protected]>
AuthorDate: Thu Jan 4 22:26:28 2024 +0000
Does the symlink exist?
exist? checks the target, which is wrong here
---
www/board/agenda/routes.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 9b4ed054..77cf0081 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -604,7 +604,7 @@ post %r{/(\d\d\d\d-\d\d-\d\d)/} do |date|
currentpath = File.join(dir, 'current.txt')
ASF::SVN.svn!('update', currentpath, {env: env})
- if File.exist? currentpath
+ if File.symlink? currentpath # Does the symlink exist?
File.unlink currentpath
File.symlink agenda, currentpath
else