mirror of
https://github.com/webmin/webmin.git
synced 2026-02-10 01:02:19 +00:00
22 lines
427 B
Perl
Executable File
22 lines
427 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
|
|
require './filemin-lib.pl';
|
|
&ReadParse();
|
|
|
|
get_paths();
|
|
|
|
if(!$in{'name'}) {
|
|
&redirect("index.cgi?path=$path");
|
|
}
|
|
|
|
if (-f "$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'} $!");
|
|
}
|
|
}
|