Relative media path problem

See following image below.

I created a folder on an external drive to hold media, “gramps_media”…which I intend to use as my base media folder and mapped that path in the prefs and added my first media to some galleries. Then, as a test, I moved that base folder to my desktop and disconnected the external drive…and then ‘remapped’ the base folder location via the prefs again…to see it this works the way I think it should.

After that, I ran the media manger to change “absolute > relative” and indeed it shows me a summary list of the ‘expected changes’, which isn’t the most intuitive listing, never says “from X to Y”, just a 'list of affected, so I hit “apply” and there’s a bit of blinking going on making me think some code did something.

Then I close Gramps proper like, reopen it and checking the previously set base path in the prefs, it does point to the new desktop location… but all the gallery images with an X on them, when I try to "Open containing folder…I get the error message looking for the absolute path. opening the ‘shared info’ dialog still shows the absolute path.

Its my expectation that after running the media manager changing absolute to relative, that every path in the ‘shared info’ dialog of all the media should have changed, but its always absolute, no matter how many times I run the media manager to convert them.

Any ideas? Gramps 5.2.2 on OSX 14+ Still conducting some tests…

image

A bit more info now. I re-mounted the external drive and the images are now found…even though the “base path” set in the prefs is still pointing to the desktop folder and not the external drive. This suggests the “base path” set in the prefs isn’t the “real path” that Gramps is looking at for media…so I am at a loss as to whats going on.

I don’t have a Mac here, but on Linux and Windows, Gramps does use the base path when files have relative paths. And relative paths are those that do not start with a / on Linux or OSX, or a drive letter followed by a colon and backslash on Windows.

For all relative paths, Gramps generates the full path by adding the file path to the end of the base path, with a / in between, or a backslash on Windows.

I also think that conversion of absolute to relative paths only works for those files that have a path that actually starts with the base path.

The solution turned out to be a bit easier, as is usually the case with PEBCAK bugs…this little guy has seemed to work wonders fixing my issue.

image

1 Like

Hello my first post here :blush:

Yes the Select a media object selector checkbox for Convert to a relative path was not obvious , I have updated the user manual for the four locations it appears to hopefully make it easier for the next person!

Mentioned in following sections of user manual:

Idea:

Maybe the Convert to a relative path checkbox should be moved or duplicated under the Family Tree tab of Edit->Preferences in the Family Tree’s Media path section also and the behavior of the Select a media object selector checkbox can be either changed to do the reverse or just removed?

Seems I cannot post more than one link to the part of user manual I modified Thanks for the account upgrade :slight_smile:

1 Like

Welcome!

That “1 link limit” was an automatic restriction for New Accounts in their first 30 days. Boosted your Account status. (Note that you can Edit your previous posting, just like the MediaWiki articles,)

1 Like