[TYPO3-dam] Roadmap

Thomas Peterson info at thomas-peterson.de
Fri Dec 30 02:05:44 CET 2005


Hello,

On development.
I have an error on Windows System:

$this->inputFile is C:/Internet/Apache 
Group/Apache2/htdocs/4/fileadmin/bands//04 - Mit Gott.mp3

When i correct the path width:

$this->inputFile=str_replace('//','/',$this->inputFile);

then work my meta extract :-)


Problem:
in this function you add to $absPath an / but in:
$absPath = tx_dam::path_makeAbsolute($path);
have this path an / at the end.

function getFilesInDir($path, $recursive=FALSE, $filearray=array(), 
$maxDirs=999) {
  if ($path) {
   $path = preg_replace('#/$#','',$path);
   $absPath = tx_dam::path_makeAbsolute($path);
   $d = @dir($absPath);
   if (is_object($d)) {
    while($entry=$d->read()) {
     if (@is_file($absPath.'/'.$entry)) {
      if (!preg_match('/^\./',$entry) && !preg_match('/~$/',$entry)) {
       $key = md5($absPath.'/'.$entry);
       $filearray[$key] = $absPath.'/'.$entry;  <---- add an /
      }
     } elseif ($recursive && $maxDirs>0 && @is_dir($absPath.'/'.$entry) && 
!preg_match('/^\./',$entry) && $entry!='CVS') {
      $filearray = $this->getFilesInDir($path.'/'.$entry, true, $filearray, 
$maxDirs-1);
     }
    }
    $d->close();
   }
  }
  return $filearray;

I hope you understand my bad English :-)
-- 

best regards
Thomas Peterson

Freelancer for web development and typo3
Tel: 0170/5045438
www.thomas-peterson.de


> Hello,
>
> For Information:
>
> I wrote on cc_metamp3 for indexing mp3 Files.
>
> I have add new tags for files "genres, album and so on".
>
> Thanks for DAM
> -- 
>
> best regards
> Thomas Peterson
>
> Freelancer for web development and typo3
> Tel: 0170/5045438
> www.thomas-peterson.de
> 





More information about the TYPO3-project-dam mailing list