Case sensitivity not handled correctly
Expected behaviour
If the extension of a file is in capital letters, it should be shown in the web.
Actual behaviour
If the extension of a file is in capital letters, it is not shown in the web. If there are two files photo.jpg and photo.JPG, in the web it looks like you have the same file twice.
Steps to reproduce
- Select to upload two file (photo.jpg and photo.JPG)
Server configuration
Operating system: MacOS 10.7.5
Web server: beta.owncloud.com
Database:SQLite3
ownCloud version: 5.0.11 RC2
Browser: Chrome
@owncloud/designers This is forced in css, so this has been a design decision?
Wondering what windows will say to that … @DeepDiver1975 @ringmaster
Interestingly, Windows retains the case information in the filename, but doesn't differentiate between two files with different case. So if I upload a .jpg, then change it to .JPG and upload it again, ownCloud takes them as two separate files. And when I try to download them from ownCloud, I get two differently-cased filenames -- and the case is retained. But if I save them to the same directory, the latter one gets "(1)" appended to the filename because the browser doesn't want to overwrite the existing file with the "same" name.
Really, this isn't a Windows issue. But I agree with the initial report: If the file is uploaded with an extension in specific case, and ownCloud differentiates the cases of extensions internally (it does), then it should display the correct case in the file list.
@ringmaster This is not only true for the extension, but for the entire file name. Windows with VFAT (and Mac OS with default HFS+) are case preserving, while Linux an almost all file systems (with exceptions like JFS, which is only case preserving by default) are case sensitive. Note that also HFS+ filesystems can be defined to be case sensitive, but only during format. Choosing case preservation only was a compatibility measure by Apple AFAIR. According to Wikipedia, Windows with NTFS is a bit more complicated, but from a users POV, it's case preserving (developers might need to be aware of the details though).
The full list is at http://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations
The significant difference:
- Case preserving:
foo.barandFOO.barcan't both exist, they are the same file, yet openingFOO.barwill openfoo.bar. - Case sensitive:
foo.barandFOO.barare different files
Note: Except for Windows (and maybe even there), Case preservation vs case sensitivity is a file system trait, not a trait of the operating system! Also important: The same distinction must be made for the backends!
Updated previous comment to include some more details.
We need to agree on a policy here, since this also affects the clients.
@karlitschek @DeepDiver1975
From a client and backend POV, the Wikipedia article linked above gives us great criteria that can limiting the syncing process across devices:
- Case sensitive
- Case preserving
- Allowed character set
- Reserved characters
- Reserved words
- Maximum length
On the desktop client, we currently tackle some aspects of allowed character sets (by forcing unicode composition per OS) and allowed characters (by being overly strict with disallowed characters).
One thing to consider is that Windows uses the MappedLocal class (instead of the Local class) to handle unicode filenames differently on the local (to server) filesystem. This may be how it manages to keep differently-cased filenames straight on the server side.
That said, I was under the impression that this original bug doesn't have anything to do with collisions based on case-sensitivity. The original bug seemed to be talking about how when you upload "photo.jpg" and "photo.JPG" the files UI shows two files named "photo.jpg". They are different files, but the UI changes the case of the extension for no apparent reason other than maybe it looks nice.
Reference screenshot with offending CSS:

Ticket#2014010908000325 — Data loss with steps to reproduce problem https://otrs.owncloud.com/otrs/index.pl?Action=AgentTicketZoom;TicketID=63816;ArticleID=100567#
steps to reproduce -User1 & user 2 use a non case sensitive filesystem (i.e Mac HFS+) -User 1: create a new folder, called "shared" -User 2: share any folder with User 1 -User 1 sees a folder "shared" and "Shared" in the WebUI -User 1 uses desktop client to sync to local machine -User 2 also uses desktop client -ownCloud gets confused and eventually removes the shared flag in User 2s folder -User 2 notices this and shares with User 1 again -User 1: desktop sync notices things are strange and starts to move files from "Shared/folder" to "shared/folder" -In the end, the content of the folder is deleted on both users machines.
architecture description
Server configuration: Operating system: Ubuntu 13.04 Web server: Apache 2.4 Database: Postgres 9.2 PHP version: 5.5 ownCloud version: 6.0.0a Updated or fresh install: fresh install List of activated app: LDAP,
Client configuration: Browser: OS X Sync Client 1.4.2 and 1.5.0 Operating system: OS X 10.8.5
I removed the confusing lowercase force. Please review https://github.com/owncloud/core/pull/7183
We should still continue the discussion about a server-side fix for case-insensitive filesystems.
Since this ticket here was originally about the extension casing in the UI, I opened a new one: https://github.com/owncloud/core/issues/17161