FVWM Bug Tracking notification

new message incoming/805

Message summary for PR#805
        From: [EMAIL PROTECTED]
        Subject: fvwm24_convert with read-only source
        Date: Wed, 07 Nov 2001 22:11:39 -0600
        0 replies       0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From [EMAIL PROTECTED] Wed Nov 07 22:11:40 2001
Received: from karazm.math.uh.edu ([129.7.128.1])
        by malifon.math.uh.edu with esmtp (Exim 3.20 #1)
        id 161gXU-0002yE-00
        for [EMAIL PROTECTED]; Wed, 07 Nov 2001 22:11:40 -0600
Received: from malifon.math.uh.edu (IDENT:[EMAIL PROTECTED] [129.7.128.13])
        by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id WAA03884
        for <[EMAIL PROTECTED]>; Wed, 7 Nov 2001 22:11:40 -0600 (CST)
From: [EMAIL PROTECTED]
Received: from localhost ([127.0.0.1] ident=65534)
        by malifon.math.uh.edu with esmtp (Exim 3.20 #1)
        id 161gXT-0002yA-00
        for [EMAIL PROTECTED]; Wed, 07 Nov 2001 22:11:39 -0600
To: [EMAIL PROTECTED]
Subject: fvwm24_convert with read-only source
Message-Id: <[EMAIL PROTECTED]>
Date: Wed, 07 Nov 2001 22:11:39 -0600

Full_Name: Mark Nejedlo
Version: 2.4.3
CVS_Date: 
OS: ANY
X_Server: N/A
Submission from: (NULL) (144.92.164.201)


If the source file given to fvwm24_convert is read only, the failure
message
is rather cryptic.  The patch below tests if the destination is writeable
and gives a more helpful error message.

--- /s/fvwm-2.4.3/bin/fvwm24_convert    Wed Nov  7 20:31:56 2001
+++ tmp/fvwm24_convert  Wed Nov  7 22:06:42 2001
@@ -30,6 +30,14 @@
 system "cp -p $source $dest 2>/dev/null"; # try to preserve permissions
 system "cp -p $source $dest2 2>/dev/null"; # try to preserve permissions
 
+unless (-w $dest) {
+  die "Unable to write destination file $dest.\n$dest copies permissions
of $source, please make $source writeable.\n";
+}
+
+unless (-w $dest2) {
+  die "Unable to write intermediate file $dest2.\n$dest2 copies
permissions of $source, please make $source writeable.\n";
+}
+
 $[ = 1;                                # set array base to 1
 $, = ' ';                      # set output field separator
 $\ = "\n";                     # set output record separator


--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to