Subject: 27.0.50; (MS-Windows) DND fails for UNC filename on same server
From: Richard Copley <[email-masked]>
To: [email-masked]
Date: Wed, 27 Feb 2019 13:41:34 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Open Windows Explorer in a file share on the local machine.
Drag a file from there and drop it onto Emacs.
The error "Can not read file:///server/share/file-name" is signalled.

dnd-get-local-file-uri attempts to convert the remote file name to a local
file name by removing the server name. That is not valid for UNC file
names.

In GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32)
 of 2019-02-12 built on X
Repository revision: d41f9123ecae45654f006d736996343275d774bd
Repository branch: buster
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
System Description: Microsoft Windows Server 2008 R2 Standard Service Pack
1 (v6.1.1130.7601.24355)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
dnd-open-local-file: Can not read file:///server/share/file-name
Configured using:
 'configure --config-cache --with-modules --without-pop --without-dbus
 --without-gconf --without-gsettings CFLAGS=-O3'

Configured features:
SOUND NOTIFY W32NOTIFY ACL GNUTLS ZLIB TOOLKIT_SCROLL_BARS MODULES
THREADS PDUMPER GMP

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils browse-url url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib url-vars elec-pair mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads w32notify w32
multi-tty make-network-process emacs)

Memory information:
((conses 16 55778 9941)
 (symbols 48 6721 1)
 (strings 32 19194 1886)
 (string-bytes 1 589026)
 (vectors 16 10297)
 (vector-slots 8 130876 12274)
 (floats 8 20 150)
 (intervals 56 221 18)
 (buffers 992 11))