check for absolute paths
parent
9776bbf853
commit
89b3bb7e38
|
@ -47,8 +47,9 @@ sub check_canrename ($$$$$$$) { #{{{
|
||||||
error(gettext("no change to the file name was specified"));
|
error(gettext("no change to the file name was specified"));
|
||||||
}
|
}
|
||||||
|
|
||||||
# Must be a legal filename.
|
# Must be a legal filename, and not absolute.
|
||||||
if (IkiWiki::file_pruned($destfile, $config{srcdir})) {
|
if (IkiWiki::file_pruned($destfile, $config{srcdir}) ||
|
||||||
|
$destfile=~/^\//) {
|
||||||
error(sprintf(gettext("illegal name")));
|
error(sprintf(gettext("illegal name")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue