Yes, you're quite right, thanks for reporting this bug. I have committed
a fix for this, similar to what you suggested but modified so it works
on both Linux and Windows.
All the best,
Papadimitropoulos Petros wrote:
> 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 = metadata_xml_file.getParentFile().getAbsolutePath();
> if ( filedir.startsWith(metadir) && (metadir.lastIndexOf("\")
> < filedir.lastIndexOf("\") ) )
> if ( filedir.equals(metadir) )
> so it works perfect (i think:) ) with windows.