From a194ca2c1f71b679e16db20b32634413623454d8 Mon Sep 17 00:00:00 2001
From: llcc <lzhes43@gmail.com>
Date: Sun, 19 Jan 2025 17:11:39 +0800
Subject: [PATCH] Check local file link ignoring path option

---
 lisp/org-lint.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index 3ab718eac..083cb2c3d 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -728,6 +728,9 @@ Use :header-args: instead"
 	(pcase type
 	  ((or "attachment" "file")
 	   (let* ((path (org-element-property :path l))
+                  (path (if (string-match "::\\(.*\\)\\'" path)
+		            (substring path 0 (match-beginning 0))
+                          path))
 		  (file (if (string= type "file")
 			    path
                           (org-with-point-at (org-element-begin l)
-- 
2.37.2.windows.2

