unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28508: 26.0.60; Problem with mkdir() on root drive (ms-windows)
@ 2017-09-19  8:26 Fabrice Popineau
  2017-09-19  8:50 ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Popineau @ 2017-09-19  8:26 UTC (permalink / raw)
  To: 28508

[-- Attachment #1: Type: text/plain, Size: 3552 bytes --]

On the following:

(make-directory-internal "c:/")

emacs reports "Permission denied" rather than "File already exists".
This has several consequences.
First,
(make-directory "c:/" t)
should not error, but it does because it does not catch the
"Permission denied" error.
Second, while running
make check
in the current emacs-26 branch, there is a failure
in files-tests.el directly related to the previous point.

Suggestion: modify files--ensure-directory to catch the case
of a root drive and avoid/catch the permission denied error.

Best regards,

Fabrice


In GNU Emacs 26.0.60 (build 3, x86_64-w64-mingw32)
 of 2017-09-19 built on LOBSANG
Repository revision: 4bd6e39c01ebdc815a5d0670922a827295766677
Windowing system distributor 'Microsoft Corp.', version 10.0.16288
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Entering debugger...
<apps> is undefined
previous-line: Beginning of buffer
Configured using:
 'configure --prefix=/MingW64 --with-jpeg --with-xpm --with-png
 --with-tiff --with-rsvg --with-xml2 --with-gnutls --with-imagemagick
 --without-dbus --enable-checking=no 'CFLAGS=-I/mingw64/include -O3 -g0
 -mtune=corei7 -fomit-frame-pointer' CPPFLAGS=-I/mingw64/include
 LDFLAGS=-L/mingw64/lib'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2
ZLIB TOOLKIT_SCROLL_BARS LCMS2

Important settings:
  value of $LANG: fr_FR
  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 subr-x puny seq dired
dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived
epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode
easymenu cl-print byte-opt gv bytecomp byte-compile cl-loaddefs cl-lib
cconv debug elec-pair time-date 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 w32notify w32 lcms2
multi-tty make-network-process emacs)

Memory information:
((conses 16 99907 11069)
 (symbols 56 20316 1)
 (miscs 48 65 98)
 (strings 32 30120 1035)
 (string-bytes 1 759473)
 (vectors 16 14922)
 (vector-slots 8 488682 7533)
 (floats 8 60 110)
 (intervals 56 314 8)
 (buffers 992 12))

[-- Attachment #2: Type: text/html, Size: 4814 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#28508: 26.0.60; Problem with mkdir() on root drive (ms-windows)
  2017-09-19  8:26 bug#28508: 26.0.60; Problem with mkdir() on root drive (ms-windows) Fabrice Popineau
@ 2017-09-19  8:50 ` Paul Eggert
  2017-09-19 16:40   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2017-09-19  8:50 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: 28508-done

[-- Attachment #1: Type: text/plain, Size: 84 bytes --]

Thanks for reporting that. I installed the attached patch into the emacs-26 branch.

[-- Attachment #2: 0001-Fix-bug-with-make-directory-on-MS-Windows-root.patch --]
[-- Type: text/x-patch, Size: 871 bytes --]

From 3c8da733879cd9c9ffd3b4709b596589f79f4fdf Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 19 Sep 2017 01:47:39 -0700
Subject: [PATCH] Fix bug with make-directory on MS-Windows root

* lisp/files.el (files--ensure-directory): Treat any error, not
just file-already-exists, as an opportunity to check whether DIR
is already a directory (Bug#28508).
---
 lisp/files.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/files.el b/lisp/files.el
index ff0ab70..0c30d40 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5337,7 +5337,7 @@ files--ensure-directory
   "Make directory DIR if it is not already a directory.  Return nil."
   (condition-case err
       (make-directory-internal dir)
-    (file-already-exists
+    (error
      (unless (file-directory-p dir)
        (signal (car err) (cdr err))))))
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#28508: 26.0.60; Problem with mkdir() on root drive (ms-windows)
  2017-09-19  8:50 ` Paul Eggert
@ 2017-09-19 16:40   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2017-09-19 16:40 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 28508, fabrice.popineau

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 19 Sep 2017 01:50:59 -0700
> Cc: 28508-done@debbugs.gnu.org
> 
> Thanks for reporting that. I installed the attached patch into the emacs-26 branch.

Thanks, the problem is fixed now on my system.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-19 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19  8:26 bug#28508: 26.0.60; Problem with mkdir() on root drive (ms-windows) Fabrice Popineau
2017-09-19  8:50 ` Paul Eggert
2017-09-19 16:40   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).