[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 00efc9cd5c 4/4: Fix: Don't URI-decode path exce
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 00efc9cd5c 4/4: Fix: Don't URI-decode path except when parsing URLs |
Date: |
Tue, 10 Oct 2023 04:00:58 -0400 (EDT) |
branch: elpa/hyperdrive
commit 00efc9cd5ca3d4b740489be36c5049fb7578a8ee
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Fix: Don't URI-decode path except when parsing URLs
---
hyperdrive-dir.el | 2 +-
hyperdrive-history.el | 3 +--
hyperdrive-lib.el | 23 +++++++++++------------
3 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 9225ced09e..d4650a7dcc 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -56,7 +56,7 @@ the metadata has been loaded."
(entries (mapcar (lambda (entry-name)
(hyperdrive-entry-create
:hyperdrive hyperdrive
- :path (concat (url-unhex-string path)
entry-name)
+ :path (concat path entry-name)
:version version))
entry-names))
(parent-entry (hyperdrive-parent directory-entry))
diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 523e170ffa..75b76c147e 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -176,8 +176,7 @@ Universal prefix argument \\[universal-argument] forces
(queue) (ewoc))
(with-current-buffer (get-buffer-create
(format "*Hyperdrive-history: %s %s*"
- (hyperdrive--format-host hyperdrive
:with-label t)
- (url-unhex-string path)))
+ (hyperdrive--format-host hyperdrive
:with-label t) path))
(with-silent-modifications
(hyperdrive-history-mode)
(setq-local hyperdrive-current-entry entry)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 94d0654067..079760b75b 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -122,17 +122,16 @@ generated from PATH."
:path path
;; TODO: Is it necessary to store the name alongside the path?
;; Instead, only store path and generate name on the fly.
- :name (url-unhex-string
- (pcase path
- ("/"
- ;; Root directory: use "/" for clarity.
- "/")
- ((pred (string-suffix-p "/"))
- ;; A subdirectory: keep the trailing slash for clarity
- (file-relative-name path (file-name-parent-directory path)))
- (_
- ;; A file: remove directory part.
- (file-name-nondirectory path))))
+ :name (pcase path
+ ("/"
+ ;; Root directory: use "/" for clarity.
+ "/")
+ ((pred (string-suffix-p "/"))
+ ;; A subdirectory: keep the trailing slash for clarity
+ (file-relative-name path (file-name-parent-directory path)))
+ (_
+ ;; A file: remove directory part.
+ (file-name-nondirectory path)))
:version version
:etc etc))
@@ -924,7 +923,7 @@ When WITH-VERSION or ENTRY's version is nil, omit
(version:VERSION)."
(handle (hyperdrive--format-host hyperdrive :with-label t)))
(propertize (concat (format "[%s] " handle)
(pcase format-path
- ('path (url-unhex-string path))
+ ('path path)
('name name))
(when (and version with-version)
(format " (version:%s)" version)))