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

 
 

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

Submitter:  None
Submitted:  Wed 24 Feb 2010 09:26:35 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-30 hjclaes StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code