mirror of
https://github.com/webmin/webmin.git
synced 2026-02-09 16:52:19 +00:00
22 lines
421 B
Perl
22 lines
421 B
Perl
#!/usr/bin/perl
|
|
|
|
require './filemin-lib.pl';
|
|
&ReadParse();
|
|
|
|
get_paths();
|
|
|
|
if(!$in{'name'}) {
|
|
&redirect("index.cgi?path=$path");
|
|
}
|
|
|
|
if (-e "$cwd/$in{'name'}") {
|
|
print_errors("$in{'name'} $text{'error_exists'}");
|
|
} else {
|
|
if (open my $fh, "> $cwd/$in{'name'}") {
|
|
close($fh);
|
|
&redirect("index.cgi?path=$path");
|
|
} else {
|
|
print_errors("$in{'name'} - $text{'error_create'} $!");
|
|
}
|
|
}
|