Media path separator

(Gramps, Windows 10, using relative paths for media)

I don’t know if this is a bug or a change I would have made in the configuration or something else but I don’t understand why the Path column of the Media category sometimes uses a \ (back slash) and other times a / (slash) as path separator for an entry (same if I export the view in ie csv) … it’s a strange mix for me …

When sorting media by Modified date i see that from 2018 to 2 september 2020 / is used as path separator.
And since the next entry (dated 12 September 2020) to now \ is used.
There is just one in this interval using / as path separator (dated 8 October 2020).

Does anyone know why?

Best regards.

1 Like

For starters, Windows doesn’t care about the separator, either will work.
Gramps seems to store the path as it is entered or imported (or otherwise modified). It looks like the Media Manager tool will change the separator to ‘’ when making modifications to convert to relative or absolute paths (it also seems to convert the path names to lower case).

There might have been some changes over the years that would cause the path separator to be different, although I would be more inclined to suspect it might have been caused by changes in the underlying libraries.

I would not worry about it; but if it bothers you, use the media manager tool replace substring option to change it.

i remember that

It doesn’t seem to have an impact on what I use in Gramps so I don’t mind.
But I prefer to know the separator isnt constant when I use the csv out of gramps.

Thank you for your answer.

Best regards.

I am on Win10

When importing from an XML .gramps backup (I do it every few months) the media is always imported as " / ". When adding new media Gramps always adds them as " \ ".

True that the media will open regardless of which slash is used, it does have an effect on the sort of the path field (which is my default).

You can use the Media Manager tool using the Replace string option to replace " / " with " \ " (just enter the slashes). This will make all records consistent.

1 Like

There is an annoying side effect if you try to use the Database Differences Report.
You can demonstrate by importing a Gramps XML backup with media data into an empty DB, then run a Database Differences Report against the file you just imported, many of the media items show up as differences because the separators have changed. see feature request #10918

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.