Repository navigation
Description
Expected behaviour
We can have filenames and foldernames starting with an accentued char (â, É, ..).
Actual behaviour
The first char is cut (Édition becomes ditions) -> impossible to access / rename / delete them.
The filename is good on the server and no problem when the accent is not the first char
(rescanning the files doesn't resolve the issues)
In the DB, we can see in fscache table
- before renaming:
(id,path,path_hash,parent,name,user,size,ctime,mtime,mimetype,mimepart,encrypted,versioned,writable)
VALUES
(13, '/admin/files/aa', 'c7219caba8fd4cc968838da48108832e', 1, 'aa', 'admin', 0, 1361292048, 1361292048, 'application/x-empty', 'application', 0, 0, 1); - after renaming:
(id,path,path_hash,parent,name,user,size,ctime,mtime,mimetype,mimepart,encrypted,versioned,writable)
VALUES
(13, '/admin/files/éaa', '3a3d7547902e55bb09fd47b9d2443b40', 1, 'aa', 'admin', 0, 1361292048, 1361292048, 'application/x-empty', 'application', 0, 0, 1);
(the field 'path' seems good but the field 'name' didn't change)
Steps to reproduce
- Upload a file (or create a empty file), rename it an put an accentued char at the beginning.
Reload the Files page, the first char is cut (Édition -> ditions) - Using the "Rescan Filsystem" app when there are already lots of files / folders from before the upgrade make impossible to access all the files / folders that start with an accentued char.
As for point 2, all the names don't have anymore the first char in their name
But the files / folders on the server are good.
Server configuration
Operating system: Debian squeeze 6.0.6
Web server:
ii apache2 2.2.16-6+squeeze10
ii apache2-mpm-prefork 2.2.16-6+squeeze10
ii apache2-utils 2.2.16-6+squeeze10
ii apache2.2-bin 2.2.16-6+squeeze10
ii apache2.2-common 2.2.16-6+squeeze10
Database:
ii mysql-server 5.1.66-0+squeeze1
ii mysql-server-5.1 5.1.66-0+squeeze1
ii mysql-server-core-5.1 5.1.66-0+squeeze1
PHP version:
ii php-pear 5.3.3-7+squeeze14
ii php-xml-parser 1.3.2-4
ii php5 5.3.3-7+squeeze14
ii php5-cli 5.3.3-7+squeeze14
ii php5-common 5.3.3-7+squeeze14
ii php5-curl 5.3.3-7+squeeze14
ii php5-dev 5.3.3-7+squeeze14
ii php5-gd 5.3.3-7+squeeze14
ii php5-mcrypt 5.3.3-7+squeeze14
ii php5-mysql 5.3.3-7+squeeze14
ii php5-sqlite 5.3.3-7+squeeze14
ii php5-suhosin 0.9.32.1-1
ownCloud version:
'version' => '4.90.7'
Locale (active):
fr_FR.UTF-8@euro
Locale (also installed):
en_GB.UTF-8 UTF-8
Client configuration
Browser:
Iceweasel 20.0a2 (2013-02-01)
srWare Iron Version 22.0.1250.0 (158531)
Operating system:
Debian squeeze
Logs
Web server error log
- on rename:
"GET /actic/?app=files&getfile=ajax/rename.php&dir=%2F&newname=%C3%A9aa&file=aa HTTP/1.1" 200 1305 "https://cloud.domainepublic.net/actic/?app=files" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20130201 Firefox/20.0 Iceweasel/20.0a2" - on rescan:
"GET /actic/?app=files&getfile=ajax/scan.php&force=true&dir=%2F&requesttoken=611f9d3ba326e42f7863 HTTP/1.1" 200 2294 "https://cloud.domainepublic.net/actic/?app=files" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20130201 Firefox/20.0 Iceweasel/20.0a2"
"GET /actic/?app=files HTTP/1.1" 200 4499 "https://cloud.domainepublic.net/actic/?app=files" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20130201 Firefox/20.0 Iceweasel/20.0a2"
"GET /actic/apps/files/js/jquery.iframe-transport.js HTTP/1.1" 304 820 "https://cloud.domainepublic.net/actic/?app=files" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20130201 Firefox/20.0 Iceweasel/20.0a2"
"GET /actic/apps/files/js/files.js HTTP/1.1" 304 708 "https://cloud.domainepublic.net/actic/?app=files" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20130201 Firefox/20.0 Iceweasel/20.0a2
... (not pertinent)
ownCloud log (data/owncloud.log)
Nothing when I rename a file or do a rescan.
After a rename, if I try to rename it again, I have:
{"app":"core","message":"unable to rename, file is not writable : files/aaa","level":3,"time":1361291596}
Browser log
JS console on rename:
https://cloud.domainepublic.net/actic/?app=files&getfile=ajax/rename.php&dir=%2F&newname=%C3%A9bb&file=bb
Response:
{"data":{"dir":"/","file":"bb","newname":"\u00e9bb"},"status":"success"}
Activity
LukasReschke commentedon Feb 19, 2013
Could you try to install the
en_US.UTF-8locale?LukasReschke commentedon Feb 19, 2013
Related to #1123
quenenni commentedon Feb 19, 2013
I installed en_US.UTF-8 and made it the default locale.
I then remove the other locale to only keep en_US.UTF-8.
the problem is still there.
quenenni commentedon Feb 19, 2013
hmmm.. The trick with the locales did something, but it's still very strange.
Now, when I rename a file aaa -> éaaa, the 'name' field of the fscache table is good.
That's a nice progress.
But, in the webinterface, when I go in the Files page, the names are bad (the first char is not showed), but but but.,, the link to access them is good.
So, I see the file aaa, but the link is /?app=files&getfile=download.php?file=/%C3%A9a%C3%A9a
What is more strange is that sometimes after opening a file and then coming back in the Files page, the names are good, but not often, and only after having opened a document (I don't understand why as the link to access the Files page is the same all the time)
PS: sorry for the related bug. I searched before posting my bug but missed that one.
quenenni commentedon Feb 19, 2013
ok.. it seems the problem is gone.
I emptied the fscache table for a project that has lots of files, did a rescan and all the problematics files / folders are good now.
On my test instance, I did the same and all is good too.
The trick was simply to empty the table fscache and do a Rescan.
Thanks for your help Lukas.