orgzly / orgzly-android

Outliner for taking notes and managing to-do lists
https://www.orgzly.com
GNU General Public License v3.0
2.7k stars 305 forks source link

File path Error #922

Open cchristion opened 2 years ago

cchristion commented 2 years ago
  1. My Current Directory Structure.

    Demo
    ├── attachments
    │   └── image1.jpg
    └── file1.org
  2. file1.org contains:

    [[file:attachments/image1.jpg]]
  3. Opens file1.org in emacs and clicks on the link, opens image1.jpg.

  4. Opens file1.org in Orgzly and clicks on the link, does not opens image1.jpg, but if the edit file1.org to:

    [[file:Demo/attachments/image1.jpg]]
  5. Opens image1.jpg perfectly.

Android 10
Orgzly Version 1.8.6
From Fdroid
xiaoruoruo commented 2 years ago

In settings, there is one setting to set the root for relative links (e.g. file:readme.txt). Can you try to set the root to the path that points to your Demo directory?

I agree that figuring out the right path in the setting isn't that user friendly.

cchristion commented 2 years ago

Nope, it didn't work.

One more thing i noticed is regardless of where the directory is in your storage, the file path will start from /storage/emulated/0/

As you can see in below images my org file is in /storage/emulated/0/.temp/Demo

But if i click on that image link, the error at the bottom show the file path from /storage/emulated/0/

As Screenshot_2022-04-24-06-08-02-11 Screenshot_2022-04-24-06-08-08-13

Other relevant images Screenshot_2022-04-24-06-05-11-55 Screenshot_2022-04-24-06-15-52-38

xiaoruoruo commented 2 years ago

The image you showed is the setting for "Root for absolute links", you have set it to the full path to the repo /storage/emulated/0/.temp/Demo. But you also need to set the "Root for relative links", because your links in the note are relatives file:attachments/.... Can you try setting "Root for relative links" to the full path?

cchristion commented 2 years ago

Changing "Root for relative links" to '/storage/emulated/0/.temp/Demo' does open the image,

But it breaks others org files links