Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: proposed pwre patch, rfc

proposed pwre patch, rfc 11 years 9 months ago #3920

  • deiKruve
  • deiKruve's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 65
  • Karma: 0
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.
The administrator has disabled public write access.

Re: proposed pwre patch, rfc 11 years 9 months ago #3923

  • deiKruve
  • deiKruve's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 65
  • Karma: 0
Claes, good day to you.

If and when you have time could you please have a look at the issue in my last post.

The original definitely does not work in Debian squeeze (Perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi
(with 56 registered patches)

I think Perl's mkdir in that version does not know how to create a multiple directory path.

The patch has worked for me. I have build .deb packages. But I will make a separate posting with my observations.

Thanks for all your good work.

Jan.
Last Edit: 11 years 9 months ago by deiKruve. Reason: typo
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 6.925 seconds