From de8dfa517fa2f5907c310d6eb3ab6177bbebcb01 Mon Sep 17 00:00:00 2001 From: Cristiano Nunes Date: Mon, 15 Apr 2024 22:30:09 -0300 Subject: [PATCH] Bug fix for smb protocols --- common-functions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common-functions.sh b/common-functions.sh index ddf83fcc..fdb1f62e 100644 --- a/common-functions.sh +++ b/common-functions.sh @@ -671,7 +671,9 @@ _get_files() { # If the items are in a remote server, translate the addresses to 'gvfs'. if [[ "$input_files" == *"://"* ]]; then - input_files=$(sed "s|\(\w*\)://|/run/user/$UID/gvfs/\1:host=|g" <<<"$input_files") + local working_directory="" + working_directory=$(_get_working_directory) + input_files=$(sed "s|[a-z0-9\+_-]*://[^$FIELD_SEPARATOR]*/|$working_directory/|g" <<<"$input_files") fi # Pre-select the input files. Also, expand it (if 'par_recursive' is true). @@ -880,7 +882,7 @@ _get_working_directory() { if [[ -n "$working_directory" ]] && [[ "$working_directory" == "file://"* ]]; then working_directory=$(_text_uri_decode "$working_directory") else - # Files selected in the search screen (or orther possible cases). + # Files selected in the search screen (or other possible cases). working_directory="" fi