From 1e3e8c1b0ad42f08e64a0e932a0d94fb5b2f1348 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Fri, 18 Jul 2008 22:04:10 -0400 Subject: More details on a related issue --- .../Allow_overriding_of_symlink_restriction.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/forum/Allow_overriding_of_symlink_restriction.mdwn b/doc/forum/Allow_overriding_of_symlink_restriction.mdwn index 88f9312b4..d6f96f78b 100644 --- a/doc/forum/Allow_overriding_of_symlink_restriction.mdwn +++ b/doc/forum/Allow_overriding_of_symlink_restriction.mdwn @@ -34,3 +34,25 @@ index 990fcaa..d7cb37e 100644 run_hooks(refresh => sub { shift->() }); + +There is a second location where this can be an issue. That is in the front of the wrapper. There the issue is that the path to the source dir as seen on the cgi server and on the git server are different - each has symlinks in place to support the other. The current wrapper gets the absolute path to the source dir, and that breaks things for me. This is a slightly different, albeit related, issue to the one above. The following patch fixes things. Again, patch inline. Again, this patch could be cleaned up :). I just wanted to see if there was any chance of a patch like this being accepted before I bothered. + +diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm +index 79b9eb3..e88118b 100644 +--- a/IkiWiki/Wrapper.pm ++++ b/IkiWiki/Wrapper.pm +@@ -9,9 +9,13 @@ use Data::Dumper; + use IkiWiki; + + sub gen_wrapper () { #{{{ ++ my $this = $0; ++ if ($config{allowsrcdirlinks}) { ++ } else { + $config{srcdir}=abs_path($config{srcdir}); + $config{destdir}=abs_path($config{destdir}); + my $this=abs_path($0); ++ } + if (! -x $this) { + error(sprintf(gettext("%s doesn't seem to be executable"), $this + } + -- cgit v1.2.3