Bug #14859
closedDeleting directories ending in a dot in fileadmin-module impossible
0%
Description
test/foo.foo = foo.foo can be deleted
test/.foo = .foo can be deleted
test/foo. = .foo can NOT be deleted
the last case should be checked when creating new directories.
I checked this on 3.7 and 3.8 on different Linux-platforms.
(issue imported from #M1280)
Files
Updated by Wolfgang Klinger over 19 years ago
Error message:
2: Target seemed not to be a directory! (Shouldn't happen here!)
Updated by Ernesto Baschny over 19 years ago
From class.t3lib_basicfilefunc.php:
/**
* Removes all dots, slashes and spaces after a path...
*
* @param string Input string
* @return string Output string
/
function cleanDirectoryName($theDir) {
return ereg_replace('[\/\. ]$','',$this->rmDoubleSlash($theDir));
}
Not sure why a dot is being removed from the end of a directory. But a solution would simply be to remove the "\." from the regexp.
Updated by Karsten Dambekalns over 18 years ago
This is still an issue with 4.0.0. I second not removing the dot, it doesn't do any harm and after all it is allowed when creating a folder.
Once you created it, neither deleting nor renaming are possible, though... sop you're stuck unless you have direct access to the machine or work around the issues differently.
Updated by Steffen Gebert almost 16 years ago
Attached a patch and sent it to core list.
Updated by Steffen Gebert almost 16 years ago
Attached updated version. This bug only affects systems with
GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] == 'utf-8' && $GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']
The patch moves deletion of trailing dots to the beginning of cleanFileName (b/c in utf-8 environments this code line would never be executed).
Updated by Marcus Krause almost 16 years ago
Won't fix.
Nevertheless, with 0010313 fileadmin-module will no longer be able to create such directories.