Item13494: OS X specific: Can't rename web (and topic too)
Priority: Normal
Current State: Needs Developer
Released In: n/a
Target Release: n/a
How to repo (only on OS X, maybe Windows):
- create a web (SomeWeb) or topic (SomeTopicName)
- try rename the web to (Someweb) - e.g. the change the case of the "W" > "w"
- can't rename: web exists
- also for the topic: Rename failed - Cannot rename SomeTopicHere to SometopicHere because it already exists.
Solution (one of)
- try execute the
rename
and check the result: succes/fail
Impact
- On the OS X installation the user unable correct the wrong-cased topic name
The main points:
- the OS X (bash, perl - etc) allows rename the "abc" to "ABC"
- but return "exists" for the any variant
Demo script
#!/usr/bin/env perl
use 5.014;
use warnings;
my $lname = "abc";
my $fname = ucfirst $lname;
my $uname = uc $lname;
my @names = ($lname, $fname, $uname);
show();
say "creating dir: $lname";
mkdir($lname) or die "Can't mkdir $lname";
show();
print "Try rename $lname to $uname ";
say rename($lname, $uname) ? "success" : "error";
show();
print "going rmdir lowercase $lname ";
say rmdir($lname) ? "success" : "error";
show();
sub show {
my @existing = glob('[Aa][Bb][Cc]');
say "Existing from glob [Aa][Bb][Cc]: >@existing<";
for my $n (@names) {
say $n . ((-e $n) ? "" : " doesn't") . " exists";
}
say "-"x80;
}
In the Linux or Freebsd the above prints
Existing from glob [Aa][Bb][Cc]: ><
abc doesn't exists
Abc doesn't exists
ABC doesn't exists
--------------------------------------------------------------------------------
creating dir: abc
Existing from glob [Aa][Bb][Cc]: >abc<
abc exists
Abc doesn't exists
ABC doesn't exists
--------------------------------------------------------------------------------
Try rename abc to ABC success
Existing from glob [Aa][Bb][Cc]: >ABC<
abc doesn't exists
Abc doesn't exists
ABC exists
--------------------------------------------------------------------------------
going rmdir lowercase abc error
Existing from glob [Aa][Bb][Cc]: >ABC<
abc doesn't exists
Abc doesn't exists
ABC exists
--------------------------------------------------------------------------------
On the OS X prints:
Existing from glob [Aa][Bb][Cc]: ><
abc doesn't exists
Abc doesn't exists
ABC doesn't exists
--------------------------------------------------------------------------------
creating dir: abc
Existing from glob [Aa][Bb][Cc]: >abc<
abc exists
Abc exists
ABC exists
--------------------------------------------------------------------------------
Try rename abc to ABC success
Existing from glob [Aa][Bb][Cc]: >ABC<
abc exists
Abc exists
ABC exists
--------------------------------------------------------------------------------
going rmdir lowercase abc success
Existing from glob [Aa][Bb][Cc]: ><
abc doesn't exists
Abc doesn't exists
ABC doesn't exists
--------------------------------------------------------------------------------
--
JozefMojzis - 02 Jul 2015
See also
Item439 and
Item4318 - Case insensitive file system issues.
--
GeorgeClark - 02 Jul 2015