[TYPO3-core] RFC #14845: Bug: Filelist module reports "type" of files also for directories

Andreas Lappe nd at off-pist.de
Fri Jun 25 10:38:04 CEST 2010


On 25.06.10, Andy Grunwald [wmdb] wrote:
> This is an SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=14845
> 
> Branches:
> TYPO3_4-3, TYPO3_4-4 & trunk
> 
> Problem:
> If a directory is called "mydir.com"
> the type column shows COM as its file type!
> 
> it should show nothing
> 
> Solution:
> Add a check if the incomming file is really a file
> 
> Notes:
> I`ve created a unit test to avoid this bug, too.
> The original patch is from "Caspar Stuebs".
> I`ve modified this to match coding guidelines.
> 
> Best regards,
> Andy

I just talked to Andy Grunwald about it:

I'd like to check for a symlink and in if it is one, output the Type
Symlink, not the ending of this link.

touch test.bat
ln -s test.bat test.com

Fileadmin would now show me Type bat and com, while in my opinion it
should be bat and symlink. What do you core-devs think? This might break
it for people relying on it, but it's wrong nonetheless, isn't it?

Further, I'd actually prefer a check for fileheader instead of
fileending. Do:

touch test.psd

I get Type psd, while I should get (IMHO) empty, as this is no valid
PSD-file... but this would break functionality even more and so far I
didn't find a php-call doing this in 5.2 (DirectoryIterator does it fine
in 5.3).

While the first looks to me like an easy fix, the latter would certainly
be a bigger rewrite... 

Comments?

So long
Andy

-- 
 ,,Wusstest du, daß in dem Haus nebenan eine Million Dollar versteckt
   sind?´´
-,,Aber da ist kein Haus nebenan.´´
 ,,Nicht? Na, dann laß uns eines bauen!´´		-Marx


More information about the TYPO3-team-core mailing list