aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/rename.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-17 19:05:40 -0400
committerJoey Hess <joey@kitenet.net>2010-04-17 19:05:40 -0400
commita97964688b73d0a3237c798dce3fb064ff29ff11 (patch)
tree6a3ca565cd89b6b69b736ccc391b4ec1aba87421 /IkiWiki/Plugin/rename.pm
parente289e0b4ba48d01e24586dbdcaeda367763edd67 (diff)
downloadikiwiki-a97964688b73d0a3237c798dce3fb064ff29ff11.tar
ikiwiki-a97964688b73d0a3237c798dce3fb064ff29ff11.tar.gz
unfinished file_prune revamp
Many calls to file_prune were incorrectly calling it with 2 parameters. In cases where the filename being checked is relative to the srcdir, that is not needed. Made absolute filenames be pruned. (This won't work for the 2 parameter call style.)
Diffstat (limited to 'IkiWiki/Plugin/rename.pm')
-rw-r--r--IkiWiki/Plugin/rename.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index 1a9da6363..69e615ead 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -63,9 +63,8 @@ sub check_canrename ($$$$$$) {
error(gettext("no change to the file name was specified"));
}
- # Must be a legal filename, and not absolute.
- if (IkiWiki::file_pruned($destfile, $config{srcdir}) ||
- $destfile=~/^\//) {
+ # Must be a legal filename.
+ if (IkiWiki::file_pruned($destfile)) {
error(sprintf(gettext("illegal name")));
}