# HG changeset patch # User Juanma Barranquero # Date 1046982605 0 # Node ID 5e493709a8efa6d5e2ff7cdf50166e9ba8063f3a # Parent 8a026033747197103b600ef0fc95ca1224e90935 (dired-at-point): Check whether the user can create a directory before asking about creating it. diff -r 8a0260337471 -r 5e493709a8ef lisp/ffap.el --- a/lisp/ffap.el Thu Mar 06 13:07:24 2003 +0000 +++ b/lisp/ffap.el Thu Mar 06 20:30:05 2003 +0000 @@ -1,4 +1,4 @@ -;;; ffap.el --- find file (or url) at point +;; ffap.el --- find file (or url) at point ;; ;; Copyright (C) 1995, 96, 97, 2000 Free Software Foundation, Inc. ;; @@ -1658,7 +1658,8 @@ (if (file-directory-p filename) (dired (expand-file-name filename)) (dired (concat (expand-file-name filename) "*")))) - ((y-or-n-p "Directory does not exist, create it? ") + ((and (file-writable-p (file-name-directory filename)) + (y-or-n-p "Directory does not exist, create it? ")) (make-directory filename) (dired filename)) ((error "No such file or directory `%s'" filename)))))