summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/rename.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index fd0bd3ae8..126c7ba13 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -47,8 +47,9 @@ sub check_canrename ($$$$$$$) { #{{{
error(gettext("no change to the file name was specified"));
}
- # Must be a legal filename.
- if (IkiWiki::file_pruned($destfile, $config{srcdir})) {
+ # Must be a legal filename, and not absolute.
+ if (IkiWiki::file_pruned($destfile, $config{srcdir}) ||
+ $destfile=~/^\//) {
error(sprintf(gettext("illegal name")));
}