[Tickets #8760] Process subdirectories correctly and handle .files appropriately

bugs at horde.org bugs at horde.org
Tue Dec 8 22:20:05 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8760
------------------------------------------------------------------------------
  Ticket             | 8760
  Created By         | jon at spriggs.org.uk
  Summary            | Process subdirectories correctly and handle .files
                     | appropriately
  Queue              | Ansel
  Version            | 1.1
  Type               | Enhancement
  State              | New
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
+New Attachment     | diff.txt
------------------------------------------------------------------------------


jon at spriggs.org.uk (2009-12-08 17:20) wrote:

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.






More information about the bugs mailing list