emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 7dac02f175 02/14: Fix: (-dir--yank-media-image-


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 7dac02f175 02/14: Fix: (-dir--yank-media-image-handler) Use current drive by default
Date: Wed, 11 Oct 2023 04:00:44 -0400 (EDT)

branch: elpa/hyperdrive
commit 7dac02f175e084a82dba89a578e2790354125249
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (-dir--yank-media-image-handler) Use current drive by default
---
 hyperdrive-dir.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 0f1961019d..b382891849 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -348,9 +348,11 @@ see Info node `(elisp)Yanking Media'."
     ;; TODO: Extend this to other media types?
     (cl-assert (and hyperdrive-current-entry
                     (hyperdrive--entry-directory-p hyperdrive-current-entry)))
-    (let ((entry (hyperdrive-read-entry :predicate #'hyperdrive-writablep
-                                        :default-path (hyperdrive-entry-path 
hyperdrive-current-entry)
-                                        :latest-version t)))
+    (pcase-let* (((cl-struct hyperdrive-entry hyperdrive path) 
hyperdrive-current-entry)
+                 (entry (hyperdrive-read-entry :hyperdrive (and 
(hyperdrive-writablep hyperdrive)
+                                                                hyperdrive)
+                                               :predicate 
#'hyperdrive-writablep
+                                               :default-path path 
:latest-version t)))
       (hyperdrive-api 'put (hyperdrive-entry-url entry)
         :body-type 'binary
         ;; TODO: Pass MIME type in a header? hyper-gateway detects it for us.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]