```
;; /28.1/lisp/net/tramp-smb.el.gz ;;
(defun tramp-smb-get-localname (vec)
"Return the file name of LOCALNAME.
If VEC has no cifs capabilities, exchange \"/\" by \"\\\\\"."
(save-match-data
(let ((localname (tramp-file-name-unquote-localname vec)))
(setq
localname
(if (string-match "^/?[^/]+\\(/.*\\)" localname)
;; There is a share, separated by "/".
(if (not (tramp-smb-get-cifs-capabilities vec))
(mapconcat
(lambda (x) (if (equal x ?/) "\\" (char-to-string x)))
(match-string 1 localname) "")
(match-string 1 localname))
;; There is just a share.
(if (string-match "^/?\\([^/]+\\)$" localname)
(match-string 1 localname)
"")))
;; Sometimes we have discarded `substitute-in-file-name'.
(when (string-match "\\(\\$\\$\\)\\(/\\|$\\)" localname)
(setq localname (replace-match "$" nil nil localname 1)))
;; A period followed by a space, or trailing periods and spaces,
;; are not supported.
(when (string-match-p "\\. \\|\\.$\\| $" localname) ;; <<<< THIS CHECK HERE <<<<<
(tramp-error
vec 'file-error
"Invalid file name %s" (tramp-make-tramp-file-name vec localname)))
localname)))
```
My work around for this was to redefine tramp-smb-get-localname with looser filename checking.
Thanks in advance, and let me know if there's anything else you need from me.