Bug #25180
closed
Filelist: Not possible to rename a directory or file from upper to lower case and backwards
Added by Speechkey over 13 years ago.
Updated almost 9 years ago.
Category:
File Abstraction Layer (FAL)
Description
First i created directory named "Template", then I tried to rename it to "template" but got an error message: 1: Destination existed already!
Occurs on Mac OS X with HFS+ (case preserving, case insensitive file system)
(issue imported from #M17770)
Tested on 4.6.0-dev.
Works fine.
Are using Windows or Linux?
That's strange.
Because in class.t3lib_extfilefunc.php the line 755 says this:
$this->writelog(5, 1, 120, 'Destination "%s" existed already!', Array($theRenameName));
So the error msg should include the given filename, which is empty in your case.
No, filename was also given, I've just remove it from error message text. I thought it isn't really significant. Filename contains correct path.
Can you please doublecheck if this folder is really not existing.
The PHP code checking this is simply:
if (!file_exists($theRenameName)) {
// .......
} else {
$this->writelog(5, 1, 120, 'Destination "%s" existed already!', Array($theRenameName));
So since the else part is taken, file_exists must return TRUE.
And this check is done exactly on the same filename as the one echoed in the error msg.
Seems to me that this could be an PHP issue. Do you have safe_mode = on ?
Have a look here: http://at2.php.net/manual/en/function.file-exists.php
I have reported a similar issue #24613. I tested that stuff with "plain PHP" (rename TYPO3 to typo3) on Windows and it worked. Maybe an issue with file_exists?
You said you're on Mac OS X.
Am I right, that this OS uses the case-insensitive HFS+?
Then we found the "problem".
file_exists return true, for the new filename because the OS API call returns also true.
I confirm this on Mac OS X with HFS+ (case preserving, case insensitive). Good catch Markus!
Oliver can you please add a relationship to #24613.
It's the same thing for Windows.
- Description updated (diff)
- Category set to File Abstraction Layer (FAL)
- Target version changed from 0 to 7.1 (Cleanup)
- Is Regression set to No
- Sprint Focus set to On Location Sprint
We first need to have a concept for handling of different cases.
- Status changed from Accepted to Closed
The discussion about this issue will be handled in #64570, since we need a general approach to this. Thank you!
- Sprint Focus deleted (
On Location Sprint)
Also available in: Atom
PDF