From 4e40e9a450e412da79b7c3ef4a1eaae268b206a4 Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Mon, 4 Oct 2004 17:50:04 +0000 Subject: [PATCH 1/1] Improved file editing using another filename: - If the user just entered spaces as filename (detection works for other commands using the "newfile" CGI parameter too), we use the original filename - Saving even works, if the file has to be created first --- devedit.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devedit.pl b/devedit.pl index 13f71ee..cf4ea19 100644 --- a/devedit.pl +++ b/devedit.pl @@ -6,7 +6,7 @@ # Dev-Editor's main program # # Author: Patrick Canterino -# Last modified: 2004-07-04 +# Last modified: 2004-10-04 # use strict; @@ -50,7 +50,7 @@ my $newfile = $cgi->param('newfile') || ''; my $new_physical = ''; my $new_virtual = ''; -if($newfile ne '') +if($newfile ne '' && $newfile !~ /^\s+$/) { $curdir = upper_path($file) if($curdir eq ''); my $path = clean_path($curdir.$newfile); -- 2.34.1