all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 32325@debbugs.gnu.org, Tino Calancha <tino.calancha@gmail.com>
Subject: bug#32325: 27.0.50; dired-create-directory: timing issue in remote machine
Date: Tue, 31 Jul 2018 22:43:43 +0200	[thread overview]
Message-ID: <87y3dri1a8.fsf@gmx.de> (raw)
In-Reply-To: <83a7q7pho6.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 31 Jul 2018 18:07:53 +0300")

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

Eli Zaretskii <eliz@gnu.org> writes:

Hi,

>> emacs -Q -l dired-aux
>> ;; Connect with Dired into a remote machine:
>> (dired "/ssh:USER@MACHINE:PATH")
>> 
>> ;; I) Create a directory
>> + a/b RET
>> 
>> ;; II) Right after run this:
>> 
>> (file-exists-p (dired-get-filename))
>> => nil
>> 
>> ;; Sometimes I get `t' sometimes `nil'.  Maybe a timing issue?
>
> I think Tramp uses some caching?  Michael will know for sure.

Indeed.  Could you (Tino), pls, test the appended patch?

Best regards, Michael.


[-- Attachment #2: Type: text/plain, Size: 734 bytes --]

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 2d253506dd..86e82d4092 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2547,7 +2547,11 @@ tramp-sh-handle-make-directory
   "Like `make-directory' for Tramp files."
   (setq dir (expand-file-name dir))
   (with-parsed-tramp-file-name dir nil
-    (tramp-flush-directory-properties v (file-name-directory localname))
+    ;; When PARENTS is non-nil, DIR could be a chain of non-existent
+    ;; directories a/b/c/...  Instead of checking, we simply flush the
+    ;; whole cache.
+    (tramp-flush-directory-properties
+     v (if parents "/" (file-name-directory localname)))
     (save-excursion
       (tramp-barf-unless-okay
        v (format "%s %s"

  reply	other threads:[~2018-07-31 20:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31  5:02 bug#32325: 27.0.50; dired-create-directory: timing issue in remote machine Tino Calancha
2018-07-31 15:07 ` Eli Zaretskii
2018-07-31 20:43   ` Michael Albinus [this message]
2018-08-01  4:53     ` Tino Calancha
2018-08-01 21:15       ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3dri1a8.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=32325@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=tino.calancha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.