$htaccess = "$dir->[0]/$config{'htaccess'}";
&can_access_dir($htaccess) || &error($text{'dir_ecannot'});
&unlink_logged($htaccess);
- &unlink_logged($dir->[1]);
- &unlink_logged($dir->[4]) if ($dir->[4]);
+ &unlink_logged($dir->[1]) if (!-d $dir->[1]);
+ &unlink_logged($dir->[4]) if ($dir->[4] && !-d $dir->[4]);
@dirs = grep { $_ ne $dir } @dirs;
}
}
dir_delete2=Un-Protect And Remove Files
dir_delete3=Un-Protect And Remove File
dir_apache=Edit Apache Options
+dir_efiledir='$1' is a directory, and so cannot be used as a users file
+dir_egfiledir='$1' is a directory, and so cannot be used as a groups file
edit_title1=Create User
edit_title2=Edit User
if ($in{'remove'}) {
# Blow away .htaccess, htpasswd and htgroups
&unlink_logged($htaccess);
- &unlink_logged($currfile) if ($currfile);
- &unlink_logged($currgfile) if ($currgfile);
+ &unlink_logged($currfile) if ($currfile && !-d $currfile);
+ &unlink_logged($currgfile) if ($currgfile && !-d $currgfile);
@dirs = grep { $_ ne $dir } @dirs;
}
else {
$file = $in{'file'};
}
}
+ -d $file && &error(&text('dir_efiledir', $file));
# Parse groups file option
if (!$can_htgroups) {
$gfile = $in{'gfile'};
}
}
+ -d $gfile && &error(&text('dir_egfiledir', $gfile));
# Parse require option
@require = ( $in{'require_mode'} );