[TYPO3-core] RFC #8040: Bug: Wrong check on creating folders in filelist makes them unaccessible

Moreno Feltscher moreno.feltscher at gmail.com
Thu Apr 10 13:46:17 CEST 2008


OK, new patch attached. Now directories and files with ending dots are
going to created in a Windows friendly way.

Cheers
Moreno

--- t3lib\class.t3lib_basicfilefunc.php	Tue Apr 01 23:36:14 2008
+++ t3lib\class.t3lib_basicfilefunc.php	Thu Apr 10 13:25:12 2008
@@ -474,7 +474,8 @@
 			$fileName = $this->csConvObj->specCharsToASCII($charset,$fileName);
 		}

-		return preg_replace('/[^.[:alnum:]_-]/','_',trim($fileName));
+    $fileName = preg_replace('/[^.[:alnum:]_-]/','_',trim($fileName));
+		return preg_replace('/\.*$/','',$fileName);
 	}

 	/**

On Thu, Apr 10, 2008 at 12:24 PM, Moreno Feltscher
<moreno.feltscher at gmail.com> wrote:
> Yes they are.
>
>  I'll post a new patch in a few minutes because I found out that
>  Windows cannot create files with a dot at the end too.
>
>  Moreno
>
>  On Thu, Apr 10, 2008 at 12:14 PM, Martin Kutschker
>
> <Martin.Kutschker at n0spam-blackbox.net> wrote:
>
>
> > Moreno Feltscher schrieb:
>  >
>  > > Nothing. But TYPO3 does a check of directory names with an ending dot
>  >  > so we have to discuss the sense of this.. So, what's wrong with dots
>  >  > at the end of a directory name?
>  >
>  >  But dots within are ok?
>  >
>  >
>  >
>  >  Masi
>  >  _______________________________________________
>  >  Before posting to this list, please have a look to the posting rules
>  >  on the following websites:
>  >
>  >  http://typo3.org/teams/core/core-mailinglist-rules/
>  >  http://typo3.org/development/bug-fixing/diff-and-patch/
>  >  _______________________________________________
>  >  TYPO3-team-core mailing list
>  >  TYPO3-team-core at lists.netfielders.de
>  >  http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
>  >
>  _______________________________________________
>  Before posting to this list, please have a look to the posting rules
>  on the following websites:
>
>  http://typo3.org/teams/core/core-mailinglist-rules/
>  http://typo3.org/development/bug-fixing/diff-and-patch/
>  _______________________________________________
>  TYPO3-team-core mailing list
>  TYPO3-team-core at lists.netfielders.de
>  http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_8040_v2.diff
Type: text/x-diff
Size: 436 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080410/b8117f76/attachment.diff 


More information about the TYPO3-team-core mailing list