Relative paths and option to copy pictures and linked files into data directory

Bug #855443 reported by Paddy on 2011-09-21
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Jendrik Seipp

Bug Description

Currently it is not possible to "migrate" a journal to a different location on your harddrive without loosing the correct link information to pictures and files. If you insert a picture and/or file, an absolute path is inserted into the journal source text.

Would it not be possible to:
* support relative links
* provide a choice between relative and absolute paths.



Thanks for the report. It is planned to copy all linked files into a
RedNotebook subdirectory and save the links relatively.

Hi Jendrik,

Great to hear :-)



Changed in rednotebook:
importance: Undecided → Wishlist
summary: - Absolute vs relative paths in links
+ Add option to copy pictures and linked files into data directory

Recently a new feature has been added that allows adding links relative to the journal directory:

[My notes from december ""2012-12.txt""]

[A file in the journal directory ""myfile.pdf""]

Changed in rednotebook:
status: New → In Progress
assignee: nobody → Jendrik Seipp (jendrikseipp)
Paddy (patrick-kudos) wrote :

Using RN 1.6.5: the relative link option does not work for inserted images, only files. It makes sense to support it for both types.

Here are some examples. The first one works (it displays the picture inlines, the other ones do not:




[test ""sample-4"".jpg]

[test ""sample-4.jpg""]

in Preview mode it looks like:





Jendrik Seipp (jendrikseipp) wrote :

Thanks, I forgot to handle images...

Jendrik Seipp (jendrikseipp) wrote :

This is now fixed in the development code.

Alexander (jamato-krym) wrote :

I am using version 1.6.6
Under Windows XP still not work relative link to file, for example:

[test.txt ""file:///full_path_to_diary_folder/files/test.txt""] work in Ubuntu
[test.txt ""file:///full_path_to_diary_folder\files\test.txt""] work in Windows

[test.txt ""files/test.txt""] work in Ubuntu
[test.txt ""files\test.txt""] not work in Windows

but relative link to image work in Windows:

Paddy (patrick-kudos) wrote :

I can confirm this behaviour Windows 7 also: relative paths to images work now, but it is broken to ordinary files. Can this be fixed because it used to work!

Changed in rednotebook:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Jendrik Seipp (jendrikseipp) wrote :

Relative links should now work on windows (at least in unreleased dev version).

Michael Entrup (entrup) wrote :

Test with RedNotebookPortable 1.7.1 on WinXP.
Relative links work fine now. I tested the following cases:

1. Files in the notebook directory
2. Files in subfolders of the notebook directory
3. Accessing files with ..\<folder>\<file>
4. Images at the notebook directory
5. Images in subfolders of the notebook directory
6. Accessing images with ..\<folder>\<image>

Thanks for your tests! The next step will be to allow users to copy the
files relatively when inserting them.

Hi Jendrik,
The relative path is enough. No need to have Rednotebook copy all the files to a subdirectory.

If someone cares about keeping the relative path, then they can easily create a folder and put in it their media files.
They even can separate them in different folders and sub-folders as they wish, ex: Audio, Text, Images etc.

What do you think?

That's true, however an option (not the default) should be added.
Otherwise nobody will notice the new feature.

Though relative links are supported, they are not added automatically. I.e. I copy all files I want to be part of my journal into the journal directory, but when I insert any of them they are added as relative.

Wouldn't it be a sensible idea to have RNB detect that a file is within the journal directory (data_dir) and convert to a relative link automatically?

summary: - Add option to copy pictures and linked files into data directory
+ Relative paths and option to copy pictures and linked files into data
+ directory
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers