[greenstone-devel] GLI 2.6 bug or feature?

From Papadimitropoulos Petros
DateWed, 22 Jun 2005 16:24:19 +0300 (EET DST)
Subject [greenstone-devel] GLI 2.6 bug or feature?
In-Reply-To (42B2457A-7090701-cs-waikato-ac-nz)
Dear list,

I found a potential problem with metadata when using gli 2.6 with winXP.
The problem appears when the names of folders of the same level of my
collection start with the same characters. Example: i have a folder
/magazine and underneath /magazine/article and magazine/article 2 (or
"articlestng" or even "article stng else"). Then gli assigns the folder
level metadata of article to article 2 as if it were under article.

Thankfully, i found an easy fix: in MetadataXmlFileManager.java i changed
the getMetadataAssignedToFile method around in line 130 to:

String filedir = file_directory.getAbsolutePath();
String metadir =

if ( filedir.startsWith(metadir) && (metadir.lastIndexOf("\")
< filedir.lastIndexOf("\") ) )

if ( filedir.equals(metadir) )

so it works perfect (i think:) ) with windows.