Open Bug 1274432 Opened 8 years ago Updated 2 years ago

Trailing Space Character In Directory Name Prevents Creation Of Sub Directory

Categories

(Thunderbird :: Folder and Message Lists, defect)

45 Branch
x86
Windows XP
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: colin.rimmer63, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160502172042

Steps to reproduce:

1. Copied an OrderId by double clicking on it and pressing Cntrl-C.
2. Right-Clicked on a folder and chose option, "Create Sub-Folder"
3. In sub folder entry field, I pasted the OrderId I'd copied earlier.
4. Press "Create Folder" button.


Actual results:

The folder was not created and nothing was reported.

After several attempts at creating sub folders, I noticed that there was a trailing space after the OrderId, that had been automatically copied as a result of double clicking on the OrderId and pressing Cntrl-C. The trailing space was preventing the creation of the sub directory. I don't believe it matters at what level.

There is a further consequence which is not immediately apparent, which I discovered during testing, namely, that the failure to create a sub-directory with a trailing space character in the name, followed by the attempt without a trailing space character, results in a sub directory that CANNOT be deleted. It is only possible to delete it by renaming it first.


Expected results:

A sub folder should have been created.

After failed attempt, due to trailing space character, it should be possible to delete the sub folder created with the same name, but no trailing space character.
OS: Unspecified → Windows XP
Hardware: Unspecified → x86
Thank you to the developers who fixed the problem experienced when trying to create a sub folder under a tier 3 folder on GMX accounts. The options in Thunderbird automatically prevent the option to create a sub folder from appearing if a tier 3 folder is highlighted - nice solution.
not sure bug list http://mzl.la/1Tkosur is helpful
Although the problem arises because the mail server in question (gmail in my case) doesn't handle the trailing white space well, and doesn't report an error back to Thunderbird, Thunderbird could cope with the situation more gracefully by stripping off trailing white space from the end of a directory name as it is entered during "Add new subfolder" instruction / when it is copied or moved. 

Not sure whether the code is implemented in Linux, but if the directory name was loaded into a variable, DIRNM for instance, it could be stripped of trailing white space using SED or AWK.

e.g. 
SP=" "
DIRNM = `echo $DIRNM | sed s/[${SP}$]+//`  --Not sure this is correct. It's decades since I used Unix.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.