Project

General

Profile

Actions

Bug #25180

closed

Filelist: Not possible to rename a directory or file from upper to lower case and backwards

Added by Speechkey about 13 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2011-02-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)

Actions #1

Updated by Markus Klein about 13 years ago

Tested on 4.6.0-dev.
Works fine.

Are using Windows or Linux?

Actions #2

Updated by Speechkey about 13 years ago

Mac Os X.

Actions #3

Updated by Markus Klein about 13 years ago

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.

Actions #4

Updated by Speechkey about 13 years ago

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.

Actions #5

Updated by Markus Klein about 13 years ago

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

Actions #6

Updated by about 13 years ago

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?

Actions #7

Updated by Markus Klein about 13 years ago

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.

Actions #8

Updated by Oliver Hader about 13 years ago

I confirm this on Mac OS X with HFS+ (case preserving, case insensitive). Good catch Markus!

Actions #9

Updated by Markus Klein about 13 years ago

Oliver can you please add a relationship to #24613.
It's the same thing for Windows.

Actions #10

Updated by Mathias Schreiber over 9 years ago

  • 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
Actions #11

Updated by Michael Oehlhof over 9 years ago

We first need to have a concept for handling of different cases.

Actions #12

Updated by Ingo Schmitt over 9 years ago

  • 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!

Actions #13

Updated by Anja Leichsenring over 8 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF