bugstoreBackup - Bugs: bug #29001, absolutePath (fileDir.pl) failing...

 
 

bug #29001: absolutePath (fileDir.pl) failing if $ENV{PWD} empty

Submitted by:  None
Submitted on:  Wed 24 Feb 2010 09:26:35 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 30 Sep 2013 12:05:02 PM UTC, comment #3:

Correction.

I try to use abs_path (easy to change ;-) ). It seems to work even with ugly names. (I made some very negative experiences with "standard" functionality.)

Heinz-Josef Claes <hjclaes>
Project Administrator
Mon 30 Sep 2013 10:49:50 AM UTC, comment #2:

Sorry for the very late response :-( .
Seems, I didn't get an email about this report and didn't look into that corner of the web page at that time ...

Your right. Thanks for the report! (Hope you still use storeBackup ;-) )

I added ERROR messages because the program cannot do anything useful when getting the conditions you described. I didn't change it in subroutine absolute path because there theres no information about the meaning of the (relative) path. It's more work to add the ERROR messages in the programs directly, but it's easier to make them individually.

This patch will be included in the next release.

BTW, simply using absolute paths bypasses the issue.

Heinz-Josef Claes <hjclaes>
Project Administrator
Wed 24 Feb 2010 09:42:08 PM UTC, comment #1:

By the way, "use warnings" would immediately make this error obvious. Is there a special reason to not use warnings?

Ben

Anonymous
Wed 24 Feb 2010 09:26:35 PM UTC, original submission:

After some problems with storeBackup*.pl, like storeBackupRecover.pl failing with "could not find info file ...", I was finally able to track the error down to the subroutine absolutePath in fileDir.pl:
On my ubuntu installation, I use "sudo storeBackup...". In this call's environment, there is no $PWD set (don't know why, but obviously never needed it before). Verified via sudo perl -e 'print $ENV{PWD}' => prints nothing.
In sub absolutePath, there's a line
$dir = $ENV{'PWD'} . "/$dir" unless ... With $PWD not set, this yields incorrect results ("some/path" => /some/path").

This can be fixed by the use of the standard module Cwd (which even contains a function abs_path...).

Thank you!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by hjclaes (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 30 Sep 2013 10:49:50 AM UTChjclaesStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1