Renaming folder to same name but different case not allowed

Bug #106737 reported by Murat Gunes
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Confirmed
Unknown
thunderbird (Ubuntu)
Triaged
Low
Mozilla Bugs

Bug Description

Binary package hint: mozilla-thunderbird

In 1.5.0.10, renaming the folder "foo" to "foO", "fOo" or "Foo" isn't allowed; the OK button isn't clickable upon typing the new name. However, this can be worked around by renaming the folder "foo" to "bar" first, and then renaming "bar" to "foO".

Revision history for this message
In , Sspitzer (sspitzer) wrote :

myk, this was a local folder, not an imap folder, right?

my guess is we do that because on some operating systems (win32), Foo is the
same file as foo.

we should check what 4.x does (on win32 and linux)

Revision history for this message
In , Naving (naving) wrote :

Seth, this is local folders. As in 4x we do not allow local folders with
different case but same name.

Revision history for this message
In , Myk (myk) wrote :

Yes, this is with local folders. I think the purpose of this bug has been
misconstrued. I'm not saying it should be possible to have two folders with the
same name but different case. I'm saying it should be possible to rename a
folder to its own name with different case.

In other words, if I have a folder called "mozilla", I should be able to rename
that folder to "Mozilla". I shouldn't be told there is already a folder with
that name when the only folder with that name is the one I am renaming.

Revision history for this message
In , Naving (naving) wrote :

4x also does the same thing. marking invalid again.

Revision history for this message
In , Håkan W (hwaara-gmail-deactivatedaccount) wrote :

No, this is not invalid. As myk says, of course the user should be able to
change case on the same folder ("Mozilla" -> "mozilla")!

If it doesn't work in 4xp, it's a bug.

Revision history for this message
In , Sspitzer (sspitzer) wrote :

I'm sure there's a good reason for why 4.x did what it did.

on win32, the OS will not support this:

C:\>touch foo
C:\>mv foo FOO
mv: `foo' and `FOO' are the same file

local folders are just files, so the rename will fail.

4.x linux also doesn't allow you to rename folders to the same name.

the code (in 4.x and in mozilla) is all XP, we didn't do XP_UNIX for that rename
code.

for linux, the underlying os can handle "mv foo FOO", but there might be some
mailnews backend code that would break if we allowed it. (I haven't researched.)

it's a valid bug, since there are ways we *could* deal with this (with folder
pretty names), but marking wontfix.

workaround for myk: exit mozilla, rename that file on disk. but be careful not
to break any existing prefs or filters that point to that folder.

Revision history for this message
In , Myk (myk) wrote :

I was able to work around the problem (modulo bug 64463) by renaming the folder
to a different name ("mozilla" -> "foo") and then renaming it back to the name I
wanted with the correct case ("foo" -> "Mozilla"). The same technique could be
employed in the code to fix this problem.

Revision history for this message
In , Håkan W (hwaara-gmail-deactivatedaccount) wrote :

Other major email apps supports renaming of this. I suggest we reopen this and
enforce myk's suggestion. Seth, Navin?

Revision history for this message
In , Sheelar (sheelar) wrote :

Seth, Navin:

any comments? Is this still won't fix or do you want me to reopen?

Revision history for this message
In , Sspitzer (sspitzer) wrote :

re-opening, myk's idea sounds good. we'll have to add extra code to check fix
new name is the same as the old name, excluding case (using strcasecmp), and if
so, do abc -> temp -> Abc.

Revision history for this message
In , Tom-sneak-dresden (tom-sneak-dresden) wrote :

*** Bug 126992 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jonathan Stewart (reaper-fudo) wrote :

I just found this bug myself today, when trying to rename a folder.
(Win 2000, 0.9.9)

I think this bug is not so much about functionality as it is about polish. Can
you not imagine lesser computer people being amazed and confused about this
message that it couldn't rename the folder even though they chaged the
capitalization? I can (but then i do tech support, so... :)

So anyways, i think this is the sort of bug that separated the amateur projects
from the pro ones. As a test, i created a folder called "mozilla" in Outlook
Express, and renamed it to "Mozilla" without any difficulty at all. Hopefully a
keen developer can polish up this part of the code.

Revision history for this message
In , Sheelar (sheelar) wrote :

*** Bug 145653 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Drew-devereux (drew-devereux) wrote :

Folks, I think there are two separate but similar bugs here:

1. When renaming folders, the new name should not be duplicate-checked against
the original folder name. Duplicate checking should be against all folders
except the one being renamed, since the name of the folder being renamed will
disappear in the process of renaming anyhow.

Note that this bug is independent of case, as can be seen when you try to
execute a rename that doesn't change anything, neither the name nor the case.
Just click on "rename folder", and then hit ENTER. This rename, although silly,
would not cause a problem since it doesn't change the state of the folders in
any way. So there should not be an error message. But instead the "A folder of
that name already exists" alert is thrown.

Fixing this would fix the problem described in comment 3, without having to
introduce any case-specific stuff.

2. The other issue is, should it be permissable to have two folders whose names
differ only by case. If so, then the rename check should be case-dependent, and
this is a separate bug. If not, then the case-independence of the renaming
check is not a problem, and only problem 1. exists. By all means, discuss the
issue, but I think you can fix and close this bug quite easily by fixing issue 1.

Revision history for this message
In , BrianLane (bcl) wrote :

I too agree that this is a bug. It doesn't matter what the underlying problem
is, the user want to rename their folder to change the case, they ought to be
able to do so without the hassle of naming it something different first. To
argue otherwise shows that you have no understand of user interfaces and user
interaction and should be delegated to writing behind the scenes code that never
sees the light of a terminal screen.

I can't believe this thing has been in here since July 2001!

bcl

Revision history for this message
In , Hskupin (hskupin) wrote :

I'm also nerved to do the extra renaming by changing the case of letters.
Because i see that Seth said that it doesn't work with windows i have to add
following. I tried the steps within the command shell:

c:\>mkdir mozilla
c:\>rename mozilla Mozilla

And it works perfectly.
Why should the same operations not work within Mozilla?

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

*** Bug 144929 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

*** Bug 171628 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

*** Bug 209026 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

*** Bug 210815 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Malte-6thfloor (malte-6thfloor) wrote :

*** Bug 219179 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Sgautherie-bz (sgautherie-bz) wrote :

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113] (W98SE)

Confirming bug and workaroud.

Updating:
*(OS) Linux -> All, Linux + Windows.
*(S) Normal -> Minor, trivial workaround in comment 7.

Revision history for this message
In , Jigho-caramail (jigho-caramail) wrote :

Same bug in Thunderbird (at least 0.5)... don't know if I have to duplicate the
bug for Thunderbird ?

How much time before a 3 year old bug is being fixed ?
(even if not a vital one, I admit)

Revision history for this message
In , Marcus Proest (marcus-proest) wrote :

Confirming for Mozilla Thunderbird 0.5 (20040207)
It's not vital, but pretty anoying.

Revision history for this message
In , Jomppa (jomppa) wrote :

Confirming for Mozilla (2004050509) (WinXP) and mozilla-1.6 (SunOS).

Revision history for this message
In , Asa (asa) wrote :

*** Bug 236143 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Asa (asa) wrote :

*** Bug 237563 has been marked as a duplicate of this bug. ***

Revision history for this message
In , LohPhat (lohphat) wrote :

As for the "workaround": exit mozilla, rename that file on disk. but be
careful not to break any existing prefs or filters that point to that folder.

Whomever suggested this has never worked at a helpdesk serving non-techie types
who don't give a rat's a** what the underlying technical issues are. The
real-world non-techie user sees a silly, petty restriction -- and as was also
said "It works in Outlook".

If you have to first rename the folder twice, then so be it:
mozilla -> $$temp$$ -> Mozilla

Revision history for this message
In , Owen-interdim (owen-interdim) wrote :

Could someone please tell me why fixing this bug is considered so difficult? It
seems like anyone set up to edit code in mozilla should be able to fix this
faster than they could edit the bug report. Perhaps I'm missing something.

I'm not currently setup to contribute, and I can't commit the time to do so now,
but this seems like it should literally be a 5-15 minute fix...

Any contributor should feel free to send me the relevant code sections, I'll fix
it, and then send it back to them to integrate and they can take the credit!

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

*** Bug 251156 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

*** Bug 241086 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

*** Bug 254416 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Francis-uy (francis-uy) wrote :

*** Bug 259601 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Francis-uy (francis-uy) wrote :

3 years? Wow. If this hasn't been fixed by the time the election is over, I'll
dig out my old programming books and take it myself.

And someone please remind me to do so.

Revision history for this message
In , Jerfa (jerfa) wrote :

*** Bug 264865 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Moz-supportware (moz-supportware) wrote :

Regarding comment 29, it *would* be a 5-15 minute fix if not for bug 65303 which
is non-trivial to fix...

Bug 65303 is sinister in its effect(s) as some effects happen in the current
session and some persist across sessions and continue to cause erratic operation
weeks later...

Revision history for this message
In , M-wada (m-wada) wrote :

Bug 104525 is Thunderbird bug for this problem.

Revision history for this message
In , Matti-mversen (matti-mversen) wrote :

*** Bug 292648 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Wurstbrot (wurstbrot) wrote :

Even when you create a new folder with name "mozilla" delete it, so that the folder can still be found in trash, create a new folder named "mozilla" and try to delete it too, you will also get the message "A folder
with that name already exists.".

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

That's bug bug 66763.

Revision history for this message
In , Andreas-kleinert (andreas-kleinert) wrote :

Just wanted to confirm the case-sensitivity (i.e. case-insensitivity) renaming problem problem also for Thunderbird 1.5.0.7 (Windows).

For example: you'd like to track some SuSE-related mailing list and created some filter for it, redirecting mails to the "SuSe-ML" folder. Then you notice the spelling mistake and want to rename it to "SuSE-ML" - does not work, because the folder 'already does exist...'

As mentioned below, the same error of course also occurs, if you just leave the name as it is, and press ENTER in the rename dialog.

Revision history for this message
In , Simon-reinhardt-gmx (simon-reinhardt-gmx) wrote :

Same in Thunderbird 1.5.0.9 on Windows (surprise, surprise ;) ).

Revision history for this message
Murat Gunes (mgunes) wrote :

Binary package hint: mozilla-thunderbird

In 1.5.0.10, renaming the folder "foo" to "foO", "fOo" or "Foo" isn't allowed; the OK button isn't clickable upon typing the new name. However, this can be worked around by renaming the folder "foo" to "bar" first, and then renaming "bar" to "foO".

Changed in thunderbird:
status: Unknown → Confirmed
Murat Gunes (mgunes)
Changed in mozilla-thunderbird:
status: Unconfirmed → Confirmed
Changed in mozilla-thunderbird:
importance: Undecided → Low
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Assigned to Mozilla Team

Changed in mozilla-thunderbird:
assignee: nobody → mozilla-bugs
Revision history for this message
In , Daan-timmer (daan-timmer) wrote :

Same problem still excists in Thunderbird 1.5.0.10 on Windows XP SP2.

I am also wondering why, (it is said anywhere above) they are using a "mv foo Foo" command and not a rename command.

If I press F2 in explorer on any file name, and change foo to Foo then it works, so why should it not work for Thunderbird?

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

It would not be a problem on XP, only on Win9X. And I suppose to some degree for fat partitions on linux (for multi-boot sharing mail folders). mv is the unix rename command...

Revision history for this message
In , M-wada (m-wada) wrote :

*** Bug 380548 has been marked as a duplicate of this bug. ***

Revision history for this message
In , M-wada (m-wada) wrote :

*** Bug 384788 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cooler (cooler) wrote :

The problem still exists in Thunderbird 2.0.0.6 (using Win XP Pro).

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 397976 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Forage (forage) wrote :

6 years and still present. What are the objections against fixing this bug?

Revision history for this message
In , Mnyromyr (mnyromyr) wrote :

> 6 years and still present. What are the objections against fixing this bug?

You didn't attach your patch yet.

Revision history for this message
In , Forage (forage) wrote :

(In reply to comment #50)
> > 6 years and still present. What are the objections against fixing this bug?
>
> You didn't attach your patch yet.
>

Hehe, I knew I forgot something ;-)

Revision history for this message
In , Philringnalda (philringnalda) wrote :

*** Bug 419802 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Philringnalda (philringnalda) wrote :

*** Bug 419987 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Philringnalda (philringnalda) wrote :

*** Bug 420321 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Philringnalda (philringnalda) wrote :

*** Bug 425994 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dayslipper (dayslipper) wrote :

Almost 7 years.

Revision history for this message
In , Joshua Cranmer (jcranmer) wrote :

(In reply to comment #56)
> Almost 7 years.
>

Comments like these are not helpful.

If you want it that badly, you could just fix it up yourself and post a patch. The fact is that there are at least two known workarounds, so this isn't a terribly big deal.

In addition, there are also several more pressing issues currently going on with mailnews core that are competing for time.

Revision history for this message
In , Dayslipper (dayslipper) wrote :

I hope that it'll be OK in TB 3.0.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 447746 has been marked as a duplicate of this bug. ***

Revision history for this message
Matt Joyce (matt-joyce) wrote :

Same for v2.0.0.16 (20080724)

Revision history for this message
In , Philringnalda (philringnalda) wrote :

*** Bug 472940 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ludovic-mozillamessaging (ludovic-mozillamessaging) wrote :

*** Bug 479760 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Craig-stephen (craig-stephen) wrote :

I am seeing this - or maybe just something similar - in Thunderbird 3.0b2:

create folder "test"
create subfolder "Aaaa"
rename subfolder to "aaaa"

for a while, two subfolders show up - "Aaaa" and "aaaa".
Shortly thereafter, "Aaaa" disappears - so it looks like the operation worked!
But... a bit later... "aaaa" disappears, too.

So now my subfolder - and everything in it - are unfindable.

If I start TB 2.0.0.21, however, "aaaa" is present.

If I restart TB 3.0b2, "aaaa" is still missing.

This seems like a problem, since, unlike the scenarious described above,
there's apparently no workaround from within TB 3.0b2.

Revision history for this message
In , M-wada (m-wada) wrote :

(In reply to comment #62)

Local mail folder? IMAP folder? Tb on Linux? on Mac OS X? or on Win?
(file system of case-sensitive filename or of case-insensitive filename)
If IMAP, see Bug 484329.

Revision history for this message
In , Craig-stephen (craig-stephen) wrote :

Oops - thanks WADA.

IMAP folder, WinXP Pro SP2.

Thanks for the cross-reference to Bug 484329;
I will have a look.

Curiously, a short time after posting this,
the original folder *reappeared* - but my
test case, documented above, is still missing
in action. Perhaps this is some IMAP server
problem.

Revision history for this message
In , M-wada (m-wada) wrote :

(In reply to comment #64)
> Perhaps this is some IMAP server problem.

External phenomenon depends on case sensitivity of file name/IMAP folder name at both IMAP server and local PC. Bug 484329 is probably IMAP server on Unix(case sentisitve) & Tb on Linux case, and Tb mis-handles it then folder is hidden. If IMAP of IIS on MS Win, different phenomenon can occur. (example. IIS on MS Win retrurn OK to create "aaa", but returns folder name of "AAA".)
Is your IMAP server case sensitive on IMAP folder name and filename?

Anyway, this bug is for rename of local mail folder.
If your problem with IMAP is different from Bug 484329, get IMAP log, and open separate bug, please.

Revision history for this message
In , C300331 (c300331) wrote :

I can't believe I started this SEVEN years ago and the bug is still UNFIXED.
Someone's already commented Outlook doesn't have the problem yet you folks piddle around arguing about "work arounds" going outside the OS and renaming, etc. Do you really think the general user does that kind of stuff? All he/she sees is a program that hasn't quite got it!

Revision history for this message
In , Wayne-lydecker (wayne-lydecker) wrote :

Please don't fix this. I found the bug this morning, which quickly led me to this report. I haven't been so amused in a long time. This problem has been around since 2001 and it still is a bug! The amount of time and energy to fix the problem would have been a fraction of that used defending why it shouldn't be fixed. Until silly bugs like this are fixed, its hard taking Thunderbird seriously. Thanks for the laugh. I'll check in every now and then to keep track of the latest developments here.

Revision history for this message
In , Gary-rumblingedge (gary-rumblingedge) wrote :

*** Bug 497317 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 259280 has been marked as a duplicate of this bug. ***

Revision history for this message
In , J-haus (j-haus) wrote :

Hi!

I noticed now in TB 3 B3 the same 'bug':

http://img4.abload.de/img/imgdxtr.gif

So i worked it this way around:
Folder Name is 'Test 2' and TB dont let it me to rename it to 'TEST 2'. So i renamed the Folder to 'BlaBla'. Then i renamed 'BlaBla' to 'TEST 2' -> finish! ;-)

Revision history for this message
Micah Gersten (micahg) wrote :

Marking this Triaged as we have an upstream bug.

Changed in thunderbird (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
In , Philringnalda (philringnalda) wrote :

*** Bug 540154 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jim (squibblyflabbetydoo) wrote :

*** Bug 546994 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dmose (dmose) wrote :

I don't think this is so high-leverage that it qualifies as "wanted", but it's not "wontfix" either since we'd accept a patch if it were to appear, so just resetting the status to nothing.

Revision history for this message
In , DGDanforth (danforth) wrote :

This bug was first reported 9 years ago! 2001-07-24 15:21:46 PDT

Why hasn't it been fixed!!!!!!!!!

Mozilla you get a very, very, poor rating for this.

Revision history for this message
In , C300331 (c300331) wrote :

I've been asking that same question for those nine years!
Even the nasty comment, "You can do it in Outlook" doesn't get a response.
This looks very unprofessional for what s(c)ould be an excellent mail reader.

Revision history for this message
In , Bugzilla-standard8 (bugzilla-standard8) wrote :

*** Bug 578921 has been marked as a duplicate of this bug. ***

Changed in thunderbird:
importance: Unknown → Low
Revision history for this message
In , Ludovic-mozillamessaging (ludovic-mozillamessaging) wrote :

*** Bug 603267 has been marked as a duplicate of this bug. ***

Revision history for this message
Fabio Napodano (napodano) wrote :

fixing this is as easy as programmatically doing what the user currently does to rename from "folder" to "FOLDER":

- rename to "folder1" (or whatever makes the folder name unique"
- rename to "FOLDER"

Revision history for this message
In , edam (edam) wrote :

Happy 10-year anniversary! :o)

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 718940 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Acelists (acelists) wrote :

*** Bug 589532 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Acelists (acelists) wrote :

David is probably not working on this.

Revision history for this message
In , Steve-si9yrl01qsu4 (steve-si9yrl01qsu4) wrote :

Just wanted to point out that this bug is still valid in 12.0b1 - Just for grins and giggles I've downloaded the source.

- Windows 7 64-bit

Revision history for this message
In , The-invincible (the-invincible) wrote :

rename from "bug" to "Bug" is still not possible in thunderbird 11.0.

Revision history for this message
In , Acelists (acelists) wrote :

This seems very similar to bug 66763. I think a very similar approach and code could be used here.

Revision history for this message
In , bowlingb (bowlingb) wrote :

This appears to still be an issue in 13.0.1.

Revision history for this message
In , Megachromulent (megachromulent) wrote :

This is fixed on Linux Mint 13 with Thunderbird 13.0.1 using IMAP...

Revision history for this message
In , Pshoplifter (pshoplifter) wrote :

This bug has been reported 11 years ago (!), and is still there. It is almost funny...

Revision history for this message
In , Stfkerman (stfkerman) wrote :

I wish I could participate in your generosity of spirit. But it's clear that their priorities are to produce new poorly tested versions with even more blatant bugs that show up within 15 minutes of installation. They can't be bothered fixing the old bugs.

That's why I don't bother reporting bugs anymore. I have learned the bitter lesson that installing a later version can be a big mistake, with the new version, one that has been out for a while and ought to be an improvement, ends up being a total disaster, with things that worked for the last 10 years suddenly broken.

Revision history for this message
In , Stfkerman (stfkerman) wrote :

I wish I could participate in your generosity of spirit. But it's clear that their priorities are to produce new poorly tested versions with even more blatant bugs that show up within 15 minutes of installation. They can't be bothered fixing the old bugs.

That's why I don't bother reporting bugs anymore. I have learned the bitter lesson that installing a later version can be a big mistake, with the new version, one that has been out for a while and ought to be an improvement, ending up being a total disaster, with things that worked for the last 10 years suddenly broken.

Revision history for this message
In , Strawpad4 (strawpad4) wrote :

Oh come on. I know it's annoying that some bugs linger for such a long time, but on the other hand

a) this bug is an extremely minor nuisance with a trivial workaround
b) on the whole, Thunderbird is an excellent piece of software that I've enjoyed using for many years now.

I think it's somewhat disrespectful to the developers to go and post bitter and dismissive comments about Thunderbird because of minor glitches.

Revision history for this message
In , Joshua Cranmer (jcranmer) wrote :

(In reply to Megac from comment #86)
> This is fixed on Linux Mint 13 with Thunderbird 13.0.1 using IMAP...

This bug is only an issue on case-insensitive filesystems, so it pretty much affects only Windows.

To everyone else: it is known that this is an issue. Complaining about this bug will not increase its priority. In fact, it will tend to decrease the likelihood that developers will work on it. Please do not comment on this bug unless you are working on, or commenting on, a proposed solution to the problem. See <https://bugzilla.mozilla.org/page.cgi?id=etiquette.html> and please follow its rules.

Revision history for this message
In , Stfkerman (stfkerman) wrote :

Only affects Windows, huh... Are there statistics somewhere on how many Windows downloads have occurred over time VS other operating environments?

Revision history for this message
In , jpfle (jpfle) wrote :

(In reply to Joshua Cranmer [:jcranmer] from comment #91)
> This bug is only an issue on case-insensitive filesystems, so it pretty much
> affects only Windows.

It doesn't only affect Windows. I have this bug on GNU/Linux, and see the bug description: "Platform: All All".

Revision history for this message
In , Acelists (acelists) wrote :

And this bug is not dead, see comment 84.

Revision history for this message
In , Acelists (acelists) wrote :

Yes, this affects Linux too (with POP3 account).

Revision history for this message
In , M04y68q005s-adam (m04y68q005s-adam) wrote :

Created attachment 645623
Proposed patch

Happy 11th birthday! I have for you a present.

Feedback welcome. The bug has nothing to do with case-insensitive file systems (the underlying file renames are performed with rename(2) on Linux/OS X and MoveFileExW on Windows, which can handle case changes just fine). The bug is entirely in the way Thunderbird was handling names.

I've only tested this on OS X.

Revision history for this message
In , Acelists (acelists) wrote :

Oh, nice present :)
Does mailnews/local/src/nsMsgMaildirStore.cpp need a similar touch like nsMsgBrkMBoxStore.cpp ?

Revision history for this message
In , DGDanforth (danforth) wrote :

Ah, from a 'user' point of view presenting code is not a solution. This needs to be incorporated into the next Fire bird release.

Revision history for this message
In , M04y68q005s-adam (m04y68q005s-adam) wrote :

(In reply to :aceman from comment #97)
> Oh, nice present :)
> Does mailnews/local/src/nsMsgMaildirStore.cpp need a similar touch like
> nsMsgBrkMBoxStore.cpp ?

I don't know, I'm not familiar enough with the code base.

Revision history for this message
In , Acelists (acelists) wrote :

Neither am I:) I just think that the implementation of maildir-lite can have the same problem as the mbox implementation (that you changed).

I'll try the patch soon on Linux.

Revision history for this message
In , Acelists (acelists) wrote :

Comment on attachment 645623
Proposed patch

Great, works for me on mbox store on Linux.

Revision history for this message
In , Acelists (acelists) wrote :

Adam, welcome to bugzilla and we welcome your patches:)
Do you know whom to request review from?

Revision history for this message
In , M04y68q005s-adam (m04y68q005s-adam) wrote :

(In reply to :aceman from comment #102)
> Do you know whom to request review from?

No clue, any suggestions?

Revision history for this message
In , Acelists (acelists) wrote :

You can find reviewers here: https://wiki.mozilla.org/Modules . Just find the module the bug is in (as seen in the Product + Component fields). Of course there are some outdated data and people overlapping modules.

Revision history for this message
In , Joshua Cranmer (jcranmer) wrote :

The patch, at a minimum, needs a test. I don't know if a mozmill test or a xpcshell test would be better here.

Changed in thunderbird:
status: Confirmed → In Progress
Revision history for this message
In , M04y68q005s-adam (m04y68q005s-adam) wrote :

I'll see what I can do for a test, but since I'm doing this in my spare time I can't promise any expediency (not that anyone expects that here given the age of this bug...).

Revision history for this message
In , Mozilla-ex (mozilla-ex) wrote :

maildir might need the same kind of change, if it checks for folder existance in the same way before adding a sub-folder.

Revision history for this message
In , Acelists (acelists) wrote :

We need somebody to test the patch on Windows. On the other OSes it is fine to change the case of a file name (representing the folder) on the filesystem level. Changed case means different name. But what happens on Windows?

Revision history for this message
In , M04y68q005s-adam (m04y68q005s-adam) wrote :

FWIW the default file system option on Mac OS X (which I tested) is case-insensitive, but yes, someone should absolutely test on Windows.

Revision history for this message
In , Acelists (acelists) wrote :

Adam, can you check the maildir code in mailnews/local/src/nsMsgMaildirStore.cpp as David points out too? Otherwise the patch might not pass review.

Revision history for this message
In , M04y68q005s-adam (m04y68q005s-adam) wrote :

I can take a look when I have a chance; do you know how I'd test that? Is it used for IMAP/POP/something else?

Revision history for this message
In , Mozilla-ex (mozilla-ex) wrote :

(In reply to Adam Rosenfield from comment #111)
> I can take a look when I have a chance; do you know how I'd test that? Is
> it used for IMAP/POP/something else?

I'd suggest writing an xpcshell test for this general feature. That would make testing maildir support fairly straightforward.

Revision history for this message
In , R-root-packet (r-root-packet) wrote :

I can confirm the same issue on Thunderbird 15.0.1, Mozilla 5.0 on Debian 6.0.5. Thunderbird is installed from Mozilla and not the Debian repos.

Revision history for this message
In , Kent-caspia (kent-caspia) wrote :

Comment on attachment 645623
Proposed patch

Sorry this review took so long, between critical TB 17 bugs and build problems its been hard to fit this in.

Testing on Windows 7, this patch does not work. When I rename folder "test" to "Test", I end up with both "test" and "Test" in the folder pane. There seems to be 2 dbs open as well, as if I click on one folder, then the other, the db attempts to rebuild.

This really should have a unit test as well.

Also the original patch bit rotted, I'll upload by unbitrotted version.

Revision history for this message
In , Kent-caspia (kent-caspia) wrote :

Created attachment 670441
Unbitrotted patch

Revision history for this message
In , Acelists (acelists) wrote :

*** Bug 810740 has been marked as a duplicate of this bug. ***

Revision history for this message
In , M-wada (m-wada) wrote :

*** Bug 840288 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Acelists (acelists) wrote :

*** Bug 859701 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Klonos (klonos) wrote :

...still an issue in TB 26 :/

Revision history for this message
In , Vseerror (vseerror) wrote :

*** Bug 968646 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cgiraud (cgiraud) wrote :

Still an issue in TB 24.5.0, Linux x86_84.
Walk around: to rename "abc" to "Abc", first rename "abc" to "xxx" and then "xxx" to "Abc".

Folder to be renamed should be excluded from existing folder list when comparing with new name.

Revision history for this message
In , Euryalus-0 (euryalus-0) wrote :

*** Bug 958572 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bugzillamozillaorg-serge-20140323 (bugzillamozillaorg-serge-20140323) wrote :

*** Bug 270726 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Glenn-glazer (glenn-glazer) wrote :

Thirteen YEARS and counting. I wish people would spend even half the effort they spend on marking duplicate bugs on actually fixing the bug.

Revision history for this message
In , Vseerror (vseerror) wrote :

updating status to reflect reality, so someone else feels free to take up the draft patch

Changed in thunderbird:
status: In Progress → Confirmed
Revision history for this message
In , Bugzilla-tf (bugzilla-tf) wrote :

*** Bug 1065260 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Lpam (lpam) wrote :

this bug was reported 13 years ago. seems like this is mozillas duke nukem. just wanted to report, that today i was confrontated with that bug too.

Revision history for this message
In , Larry Xiao (xiaodi) wrote :

Same here, on thunderbird 31.3.0

(In reply to spam from comment #127)
> this bug was reported 13 years ago. seems like this is mozillas duke nukem.
> just wanted to report, that today i was confrontated with that bug too.

(In reply to Glenn Glazer from comment #124)
> Thirteen YEARS and counting. I wish people would spend even half the effort
> they spend on marking duplicate bugs on actually fixing the bug.

Revision history for this message
In , Acelists (acelists) wrote :

(In reply to Larry Xiao from comment #128)
> (In reply to Glenn Glazer from comment #124)
> > Thirteen YEARS and counting. I wish people would spend even half the effort
> > they spend on marking duplicate bugs on actually fixing the bug.
The problem is, those are not the same people...

Revision history for this message
In , Glenn-glazer (glenn-glazer) wrote :

(In reply to :aceman from comment #129)
> (In reply to Larry Xiao from comment #128)
> > (In reply to Glenn Glazer from comment #124)
> > > Thirteen YEARS and counting. I wish people would spend even half the effort
> > > they spend on marking duplicate bugs on actually fixing the bug.
> The problem is, those are not the same people...

So? The reply was to two similar comments from two different people, gathered together.

Revision history for this message
In , Bugzilla2007 (bugzilla2007) wrote :

Aceman, given the high popularity of this bug, can't we use the workaround as an interim fix when
renaming foo to Foo:

sourcefolder=foo
targetfolder=Foo
if (lcase(sourcefolder) == lcase(targetfolder)) {
- first rename foo to foo.tmp_random
- then rename foo.tmp_random to Foo }

Renaming folders doesn't happen every day, so taking a split second longer doesn't matter.
That way, it'll work for all types of folders/OSs/POP/Imap no matter what (except for those where the server doesn't allow renaming).
Then, we can spend the next decades looking for the real fix. Or maybe this is the real fix, because even some servers don't accept changing capitalization only, so we'd elegantly trick those.
The only scenario where this might fail are extra long nested folder names at the limit, where we might fail to create the tmp target folder if the tmp path gets too long or such.

Revision history for this message
In , Acelists (acelists) wrote :

I'd think that is would even be the final solution, not a workaround. We can never know what filesystem we are really on (even if we knew, we do not know all the limit or all exotic systems).

We must just try it. On any system, if we detect the new name only changes in case, do the renaming dance comment 131 and comment 7 proposed. On on the high level TB does not allow 2 folders to exist if they only differ in case (in CheckIfFolderExists). So this dance can be already done in nsLocalMailFolder.cpp, I don't think we need to code it in all the backends (mbox/maildir).

Revision history for this message
In , UlfZibis (ulf-zibis) wrote :

(In reply to Thomas D. (currently busy elsewhere; needinfo?me) from comment #131)
> The only scenario where this might fail are extra long nested folder names
> at the limit, where we might fail to create the tmp target folder if the tmp
> path gets too long or such.
To avoid this, you could just try to rename to fo1, fo2, ... foa, fob, ... until success. tmp may be already in use.

> because even some servers don't accept changing capitalization only, so we'd elegantly trick those.
+1

Revision history for this message
In , Realgrouchy (realgrouchy) wrote :

I've noticed a problematic behaviour as a consequence of this bug, which I've described in Bug 104525, but since this thread is related and more active, I thought I should mention it here too:

In TB 38.2.0 on OSX 10.10.5, when I try to rename a folder in a POP account, I do *not* get the error until I dismiss the rename dialog.

As a result, if I click "Rename" X times in the rename dialog (with no response from TB), it is only *after* I dismiss the rename dialog that I get a succession of X error messages.

For the purposes of changing the case, this problem will be redundant when this bug (Bug 92165) and/or Bug 104525 are resolved, but I've filed it as a separate Bug 1207212 since this error also happens in non-bug situations.

- RG>

Revision history for this message
In , Alta88-t (alta88-t) wrote :

*** Bug 1287718 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Vseerror (vseerror) wrote :

*** Bug 1485853 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Sherman-m (sherman-m) wrote :

Postbox would be willing to sponsor the development of this fix if anyone would like to work on this.

Requirements:

* Cannot be structured as an add-on (as those are no longer supported in Postbox)
* Cannot rely on changes or APIs made after 52.8 (as Postbox is currently based on this version)
* Must work on Windows 7, 8, and 10 and macOS 10.11 and higher.

If interested, let me know and we'll work out the details.

Revision history for this message
In , Jorgk-bmo (jorgk-bmo) wrote :

Created attachment 9013294
92165-v2.patch - rebased again

Carrying forward Kent's r-.

This actually works fine for a local folder, but it doesn't work for IMAP. If you rename folder "Tests" to "tests" you end up with two versions in the UI. In the subscribe dialogue you only get "tests" and there's also only one "tests.msf" file. After a restart, the "Tests" folder is gone. So the solution can't be far off. Of course it's missing the maildir part which shouldn't be hard to add.

Since this is one of the TB "papercuts" (https://wiki.mozilla.org/Thunderbird/Papercuts), maybe we can look at this bug one day soon now.

Since Ben is already working a bit on fixing some maildir issues and touching the relevant files, maybe he'd be a good candidate. Or maybe not since this would need Windows to test? Just take it as a suggestions since I can't allocate resources.

Revision history for this message
In , Jorgk-bmo (jorgk-bmo) wrote :

I did a bit of debugging. folderPane.js:2605, folder.rename(aName, msgWindow);, calls nsImapMailFolder::Rename() which calls nsImapService::RenameLeaf() and that opens this URL via GetImapConnectionAndLoadUrl():
  "imap://<email address hidden>@server:143/rename>.INBOX.TestMessages>.INBOX.testMessages"
Later we came into nsImapIncomingServer::OnlineFolderRename() and nsImapMailFolder::RenameClient() which does indeed call nsMsgDBFolder::PropagateDelete() as a comment in the patch suggests.

So that's all very well, but there appears to be some code missing to remove the no longer existing folder from the UI.

Revision history for this message
In , Benc-q (benc-q) wrote :

It does fit in quite nicely with what I've been looking at with the EmptyTrash() implementation, so I'm happy to look at it (and in fact, I just spent a couple of hours poking through the code from where Jorg left off - I'll write up my thoughts).

I can run a profile off a vfat filesystem (usb stick or loopback trickery) for case-insensitive filenames, I should be able to hit the same issues as on Windows.

There is an issue even on Linux: if I rename an imap folder "aaa" -> "Aaa", it looks fine in the GUI, but the old "aaa" directory will still be on the filesystem. So something isn't quite right there.

Revision history for this message
In , Benc-q (benc-q) wrote :

Here are my notes - mostly a braindump for my own reference:

Local Folders

nsMsgLocalMailFolder::Rename() performs these steps:

1) calls nsIMsgPluggableStore::RenameFolder() to rename the raw filesystem artifacts:
     * mbox/maildir
     * any .sbd dir
     * .msf file (actually, I'm not sure this should be done by the msgStore)
2) updates the new folder's pretty name
3) checks up on any filters which might be referencing the folder
4) calls RenameSubFolders() which recursively creates new child folders, checking for filter usage as it goes.
5) detaches the old folder from the parent (and calls progagateDelete() on it) and adds the new one.
6) tells the nsIMsgFolderNotificationService that the folder has been renamed.

IMAP folders

nsImapMailFolder::Rename() just tells the server to rename the folder.
Later on, they'll be a nsImapIncomingServer::OnlineFolderRename() coming in, where the local imap folder renaming is handled.
I haven't picked all the way through this yet, but quick observations are:
1) if it's a virtual folder, it just calls nsMsgDBFolder::Rename() and leaves it at that.
2) the pluggable message store isn't used.
3) it calls both nsImapMailFolder::RenameClient() and nsImapMailFolder::RenameLocal(). RenameLocal() seems to be primarily concerned with renaming the local filesystem artifacts, while RenameClient() handles the folder hierarchy and assort imap-specific stuff.

Quick thoughts:

- The IMAP path should use the pluggable mail store to handle the filesystem artifacts.
- there _should_ be a whole heap of common functionality that can be shared between local and imap (including the nsMsgDBFolder::Rename() that imap virtual folders use).
- There's a whole load of folder deleting and rebuilding going on, which seems unnecessary and overly-complicated.
It seems like it _should_ be possible to just rename folders in place, rather than just ditching them completely and rebuilding them... (ie filesystem rename, then patch up affected URIs etc)
- that said, I'm sure this bug can be addressed with a quick-n-nasty patch for now.

Revision history for this message
In , Jorgk-bmo (jorgk-bmo) wrote :

(In reply to Ben Campbell from comment #140)
> It does fit in quite nicely with what I've been looking at with the
> EmptyTrash() implementation, so I'm happy to look at it ...
Thanks. I was in to minds and almost about to cancel the NI since this is going ((too) far) into IMAP. But then on the other hand, we need to increase our backend knowledge of IMAP.

Revision history for this message
In , Bugzilla2007 (bugzilla2007) wrote :

*** Bug 1708164 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Vseerror (vseerror) wrote :

*** Bug 1739969 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Adrien-rybarczyk (adrien-rybarczyk) wrote :

Perhaps the title should be changed, as it also affects imap folders.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 1746346 has been marked as a duplicate of this bug. ***

Changed in thunderbird:
importance: Low → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.