Subject: Re: bug#12725: dired-do-shell-command should allow . and ..
From: Stefan Monnier <[email-masked]>
To: Hemal Pandya <[email-masked]>
Cc: [email-masked]
Date: Thu, 25 Oct 2012 09:02:15 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> In dired buffer, hitting `!' on current directory (`.') or parent
> directory (`..') results in the error
>    dired-get-filename: Cannot operate on `.' or `..'
> There is no reason this should not be allowed. Please allow running
> commands on these two.

I've installed the patch below which seems to fix your problem,
thank you for bringing it up here,

        Stefan

=== modified file 'lisp/dired.el'
--- lisp/dired.el	2012-10-24 14:38:49 +0000
+++ lisp/dired.el	2012-10-25 12:59:39 +0000
@@ -620,7 +620,7 @@
   (let* ((all-of-them
 	  (save-excursion
 	    (dired-map-over-marks
-	     (dired-get-filename localp)
+	     (dired-get-filename localp 'no-error-if-not-filep)
 	     arg nil distinguish-one-marked)))
 	 result)
     (if (not filter)