Commit 57e8b05e authored by Thomas Bernard's avatar Thomas Bernard 💬

Allow directory bookmarks to be relative to Data_directory

see http://pulkomandy.tk/projects/GrafX2/ticket/45
Still to do : the "Set Rel" which is the difficult part :)

Also it may be better to use Program_directory instead of Data_directory
parent 1232675b
Pipeline #16339407 passed with stage
in 2 minutes and 11 seconds
......@@ -1889,7 +1889,10 @@ byte Button_Load_or_Save(T_Selector_settings *settings, byte load, T_IO_Context
case -1: // bouton lui-mme: aller au rpertoire mmoris
if (Config.Bookmark_directory[clicked_button-10])
{
strcpy(Selector_filename,Config.Bookmark_directory[clicked_button-10]);
if (Config.Bookmark_directory[clicked_button-10][0] == '.') // Relative path
snprintf(Selector_filename, sizeof(Selector_filename), "%s%s", Data_directory, Config.Bookmark_directory[clicked_button-10]);
else
snprintf(Selector_filename, sizeof(Selector_filename), "%s", Config.Bookmark_directory[clicked_button-10]);
Selected_type=1;
has_clicked_ok=1;
Reset_quicksearch();
......
  • I knew I forgot about something in my list of quirks!

    Amiga platforms do not use ".." to denote the parent directory, they use "/". And they don't have anything to denote the current directory: instead absolute paths start with "volume_name:"

    So, it may not be a good idea to rely on UNIX-style paths here.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment