Make sure deleted files aren't written out again
authorJamie Cameron <jcameron@webmin.com>
Mon, 7 Jun 2010 22:56:45 +0000 (15:56 -0700)
committerJamie Cameron <jcameron@webmin.com>
Mon, 7 Jun 2010 22:56:45 +0000 (15:56 -0700)
apache/apache-lib.pl
web-lib-funcs.pl

index add6773..ced655b 100755 (executable)
@@ -1736,9 +1736,7 @@ if ($config{'link_dir'}) {
        local $short = $file;
        $short =~ s/^.*\///;
        local $linksrc = "$config{'link_dir'}/$short";
-       &lock_file($linksrc);
-       unlink($linksrc);
-       &unlock_file($linksrc);
+       &unlink_logged($linksrc);
        }
 }
 
index 71149a0..ba2e76a 100755 (executable)
@@ -5118,6 +5118,7 @@ return 1 if (&is_readonly_mode());
 my $rv = 1;
 my $err;
 foreach my $f (@_) {
+       &unflush_file_lines($f);
        my $realf = &translate_filename($f);
        &webmin_debug_log('UNLINK', $realf) if ($gconfig{'debug_what_ops'});
        if (-d $realf) {