orgzly-android icon indicating copy to clipboard operation
orgzly-android copied to clipboard

File path Error

Open cchristion opened this issue 3 years ago • 4 comments

  1. My Current Directory Structure.
Demo
├── attachments
│   └── image1.jpg
└── file1.org
  1. file1.org contains:
[[file:attachments/image1.jpg]]
  1. Opens file1.org in emacs and clicks on the link, opens image1.jpg.
  2. 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]]
  1. Opens image1.jpg perfectly.
Android 10
Orgzly Version 1.8.6
From Fdroid

cchristion avatar Feb 18 '22 13:02 cchristion

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.

xiaoruoruo avatar Apr 23 '22 22:04 xiaoruoruo

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

cchristion avatar Apr 24 '22 01:04 cchristion

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?

xiaoruoruo avatar Apr 24 '22 15:04 xiaoruoruo

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

But it breaks others org files links

cchristion avatar Apr 24 '22 16:04 cchristion