Hi,
I moved a project from Windows to Mac (might be relevant or not) and after working with content for a while, I went to the GUI to create backups. Some of the DBs appears as duplicated and are listed with different caps.
Ex.
- D-archie - D-Archie
The DBs listed in the GUI have the same size, they have the same content when opened in, even the same list of available backups, they look like they point to the same repository. In fact, the data repository only shows 1 folder and db:list() returns no duplicate, just the original names with the original caps. The WebDAV data source connection in Oxygen shows no duplicate either.
I'm afraid of deleting the duplicate from GUI, as there is only one match in the data folder. I'll look in my code for a place where I might have typed the name with the wrong caps (I'm guessing a db:add or db:replace operation with the wrong caps would be the source of the problem).
The request is for GUI and xquery to handle things in a similar fashion on a given platform. Either the caps make a difference, which means that trying to save content in a DB that doesn't exists (different caps = different names = different DBs) returns an error, or GUI handles caps as irrelevant and shows only 1 instance of the DB.
Regards,
France P.S. I'm on 8.2.
Hi France,
Unfortunately, Apple did its very own thing regarding case handling (see e.g. [1]): It is based on FreeBSD, which is case sensitive, but since version X, case is ignored on a higher level of the system. As a result, it's pretty difficult on Java level (or it requires a lot of additional code and checks) to decide what OSX will eventually do when running file operations. We already check if BaseX is running on a Windows or UNIX/Linux platform, and Mac is somewhere in between. Sigh. I would often love to have a world in which I needn't fix things that others have caused...
When it comes to application code, the solution I would suggest is to always use the same writing when creating and accessing databases. In our own team, for example, we are working with Windows, Linux and Mac systems, and in our commercial applications, database names are always written in lower case.
Best, Christian
[1] http://www.informit.com/articles/article.aspx?p=1144082&seqNum=4
On Tue, Jun 16, 2015 at 8:22 PM, France Baril france.baril@architextus.com wrote:
Hi,
I moved a project from Windows to Mac (might be relevant or not) and after working with content for a while, I went to the GUI to create backups. Some of the DBs appears as duplicated and are listed with different caps.
Ex.
D-archie D-Archie
The DBs listed in the GUI have the same size, they have the same content when opened in, even the same list of available backups, they look like they point to the same repository. In fact, the data repository only shows 1 folder and db:list() returns no duplicate, just the original names with the original caps. The WebDAV data source connection in Oxygen shows no duplicate either.
I'm afraid of deleting the duplicate from GUI, as there is only one match in the data folder. I'll look in my code for a place where I might have typed the name with the wrong caps (I'm guessing a db:add or db:replace operation with the wrong caps would be the source of the problem).
The request is for GUI and xquery to handle things in a similar fashion on a given platform. Either the caps make a difference, which means that trying to save content in a DB that doesn't exists (different caps = different names = different DBs) returns an error, or GUI handles caps as irrelevant and shows only 1 instance of the DB.
Regards,
France P.S. I'm on 8.2.
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com
basex-talk@mailman.uni-konstanz.de