[TYPO3-core] #32261 and #31987 (mkdir permissions bug)

Loek Hilgersom loek at netcoop.nl
Fri Dec 2 17:45:12 CET 2011


Hi Xavier, dear ghost ;-)

 > If you feel it might be too long to argue in Gerrit, then you better
 > should start a discussion in the Core list, just as we did before the
 > Gerrit-era.

Ok, moved the discussion about the actual issue to the core-list.

 >> Anyway, it concerns
 >> http://forge.typo3.org/issues/32261
 >> https://review.typo3.org/#change,7022
 >>
 >> There is feedback (with a -1) concerning the fact that the patch also
 >> changes or extends the functionality of the mkdir method and now I am
 >> wondering
 >> a. where to discuss this?
 >
 > I'd say no need to discuss, Oliver Klee's point is just right, you are
 > changing the behavior of mkdir. I understand you don't want to duplicate
 > code but I guess it would be better then to make mkdir call mkdir_deep
 > for instance, but not the other way around.

Not sure about that, in my opinion it makes more sense if the multiple action 
calls the single action.

 >> Meanwhile I found out that the bug was actually introduced by
 >> http://forge.typo3.org/issues/26240 which was included in TYPO3 4.6.
 >> Reverting that would solve the issue, we only loose the throwing of
 >> exceptions that was also introduced.
 >
 > I don't see the point of reverting this one, just fix current code.

I mentioned reverting because putting the proper code for fixing permissions and 
ownership into mkdir_deep is actually how it was in TYPO3 4.5 (although I might 
have implemented it slightly different, the effect should be the same).
But I agree, reverting is not really an option.

 >> Finally about the code: I actually prefer to merge the mkdir and
 >> mkdir_deep methods and deprecate mkdir_deep. That would minimize the
 >> amount of code, and mkdir would become more like an enhanced
 >> (typo3-)version of the php-mkdir.
 >
 > That makes sense but we cannot change that for TYPO3 4.6 or below. So
 > you should consider fixing it "the way it is" in 4.6 (4.5?) and suggest
 > a deprecation in master (4.7), keeping in mind that it will have to be
 > supported until development of 4.9 starts anyway.

I don't see why (but perhaps we're not talking about the same thing): the 
proposed patch for mkdir works for all existing uses because the functionality 
only changes when it's called using the additional optional parameter 
($createParents).
mkdir_deep could just call mkdir(..., TRUE), which fixes the current issues and 
can then be dropped completely in some further future version.
Apparently, the problem didn't exist in 4.5 yet, so no need to backport.

Loek


More information about the TYPO3-team-core mailing list