Hallo,
This seems to work better on my Debian Squeeze system.
As said before the lady Perl and I are no friends, so I do not know if this is
entirely correct; especially the error handling!
jan@JanDell:~/deb-proview/pwrsrc_4.8.5-1$ git diff HEAD
diff --git a/src/tools/pwre/src/os_linux/pwre.pl b/src/tools/pwre/src/os_linux/p
index 34943b5..44b7ced 100755
--- a/src/tools/pwre/src/os_linux/pwre.pl
+++ b/src/tools/pwre/src/os_linux/pwre.pl
@@ -1495,10 +1495,12 @@ sub create_base()
sub create_dir()
{
+ use File::Path 'mkpath';
+ use File::stat;
my($dir) = $_[0];
- if (!chdir($dir)) {
- if (mkdir($dir, 0775)) {
+ if (!stat($dir)) {
+ if (mkpath($dir, 0, 0775)) {
# printf("-- mkdir: %s\n", $dir);
} else {
printf("++\n++ Cannot mkdir %s, reason: %s\n", $dir, $!);
Enjoy,
Jan.