6.0.0-alpha14
6/25/25

[#8760] Process subdirectories correctly and handle .files appropriately
Summary Process subdirectories correctly and handle .files appropriately
Queue Ansel
Queue Version 1.1
Type Enhancement
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester jon (at) spriggs (dot) org (dot) uk
Created 12/08/2009 (5678 days ago)
Due
Updated 05/18/2010 (5517 days ago)
Assigned 12/08/2009 (5678 days ago)
Resolved 02/13/2010 (5611 days ago)
Milestone
Patch No

History
02/13/2010 05:53:02 PM Michael Rubinsky Comment #6
State ⇒ Resolved
Reply to this comment
Fixed by simply running $dir through Util::realPath (in CVS) and 
Horde_Util::realPath (in Git)

Thanks for the report.
02/13/2010 05:47:52 PM CVS Commit Comment #4 Reply to this comment
Changes have been made in CVS for this ticket:

Get the canonical path to import.
Bug: 8760
http://cvs.horde.org/diff.php/ansel/scripts/recursive_import.php?rt=horde&r1=1.11&r2=1.11.2.1&ty=u
12/09/2009 12:02:13 AM Michael Rubinsky Comment #3 Reply to this comment
Sadly, this part will currently *always* discard dotfiles because I 
can't work out how to make the option-matching code accept -s or 
--secret as options, like -k or --keep currently does.
I don't think we'd *want* ever want to look at dotfiles anyway, so not 
a big deal.
12/08/2009 11:51:20 PM Jan Schneider Comment #2 Reply to this comment
This looks for a / at the start of the path, and if that doesn't 
exist, do a `pwd` and add that to the beginning of the path. There's 
probably a much more efficient way of doing this, but off-hand I 
couldn't think of it.
Use Util::realPath() for that instead.
12/08/2009 11:18:41 PM Chuck Hagenbuch State ⇒ Assigned
Assigned to Michael Rubinsky
 
12/08/2009 10:20:05 PM jon (at) spriggs (dot) org (dot) uk Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Process subdirectories correctly and handle .files appropriately
Queue ⇒ Ansel
Milestone ⇒
Patch ⇒ No
New Attachment: diff.txt Download
State ⇒ New
Reply to this comment
The attached diff patches a failing in the current 
/ansel/scripts/recursive_import.php where if you specify a 
subdirectory, it won't process the directory correctly. This is due to 
slightly faulty logic in the code where it manually traverses the 
tree, rather than searching the tree relatively. Without 
re-engineering the import process, I have created this slightly cludgy 
patch which will only work on *nix based systems.

This looks for a / at the start of the path, and if that doesn't 
exist, do a `pwd` and add that to the beginning of the path. There's 
probably a much more efficient way of doing this, but off-hand I 
couldn't think of it.

There's also included in this diff (which again, only works on *nix 
file systems) which looks for hidden dotfiles and  discards them. This 
is particularly useful if you moving your photos from a Subversion 
repository into ansel. Sadly, this part will currently *always* 
discard dotfiles because I can't work out how to make the 
option-matching code accept -s or --secret as options, like -k or 
--keep currently does.

Saved Queries