From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Feb 2018 17:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 30533@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.151906131719287 (code B ref -1); Mon, 19 Feb 2018 17:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Feb 2018 17:28:37 +0000 Received: from localhost ([127.0.0.1]:51542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enpEz-000511-3P for submit@debbugs.gnu.org; Mon, 19 Feb 2018 12:28:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enghS-0006IS-FF for submit@debbugs.gnu.org; Mon, 19 Feb 2018 03:21:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enghL-0007wb-KC for submit@debbugs.gnu.org; Mon, 19 Feb 2018 03:21:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1enghL-0007wV-GI for submit@debbugs.gnu.org; Mon, 19 Feb 2018 03:21:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enghJ-0004dV-1X for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 03:21:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enghE-0007vG-7s for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 03:21:16 -0500 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:34616) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1enghD-0007uu-RQ for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 03:21:12 -0500 Received: by mail-lf0-x243.google.com with SMTP id l191so11888754lfe.1 for ; Mon, 19 Feb 2018 00:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mediastrategi-se.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=FuT5OtXcwsLG/ded7kSfv8QTxjDPnOn5/XOWjlkbOeQ=; b=Coi/vc+9fKf9gfM5J821Phcr5rJImqS3wDIn2MnqhNrYF0XC9hxyUXOy+WrcN4+x9N alRCQH8OUjrVGmDxIwWdXV+GPGYKDkDiXg+TBgP1AYKkNDKKFwGP64MmtclYnRjOfJ/J dilyvqaD0j8NjjRcHPG4HBJg1+FT256Fc3IHIwWGWZVVFQ/0a/pFpQUXwpvrvYsbvl1s ONo4CvKelY8R4zPluJxRuv2/x4VPZ85ntA6E/ePeOnV0X5icpmnUtiXfoaeyJkbVPDWN 97azv2g56yAcN/3+UWsdfz9eN5cmrGwPg2KdrTD3/GW8bLx4/a6iLS54gtQoRwUXK4l8 K9qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=FuT5OtXcwsLG/ded7kSfv8QTxjDPnOn5/XOWjlkbOeQ=; b=tLDyd97JfTnbZ+ggg/3o6GrZJOrwc2pxcV0G1KISsCjx7V4pS6u8dLImVyI8CsYtM8 ooDvgazJXMZO2Mmn4Y9pmxbHn8WyG5FZswD+M0Mu78P0t/Q2NmT/BIS6eGXMPozCdQ0K LCh6JlkwRUrcn+1aBgUBjAlvzUV9APzQ9eGelcUATTK6VI2sLJV8szzuVmnZVqb0udXN o6bELhfoLMleEe29CZvn1Cz4gxKjkSwt1PjqqebjMJLCmMm8GnCUv5azcJM+GSNibC6A rSInCntpYW5vcWIKAINFEH+oou8xpHn/AzBeyw/T+7eFHyYl8R1K1WMo3Sh+40pfNTyW Vn6w== X-Gm-Message-State: APf1xPA8WqUlMMfYV8A4Dkam59KgtjSAWyMmCS0PxkfA2q90S0t4VY3Z iGxInbA7Faed26BdjpoAUrIYLZW/ X-Google-Smtp-Source: AH8x226WRAv/uGx4DDnoUcnFI++pyJIHyInDo5I6lyoWkR+05jM/22ZrIgnTOkKOh3ivjlGagvP+Bw== X-Received: by 10.46.93.148 with SMTP id v20mr8547198lje.34.1519028469552; Mon, 19 Feb 2018 00:21:09 -0800 (PST) Received: from Christians-iMac (a077.broadband2.quicknet.se. [92.43.32.77]) by smtp.gmail.com with ESMTPSA id a68sm1983105ljb.88.2018.02.19.00.21.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Feb 2018 00:21:08 -0800 (PST) From: Christian Johansson Date: Mon, 19 Feb 2018 09:18:33 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Mon, 19 Feb 2018 12:28:35 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) I have a case where Emacs have trouble understanding whether a remote file is a file or a directory, I run this code where PATH-LOCAL is on localhost and PATH-REMOTE is on a remote FTP via TRAMP (let ((file-or-directory (not (file-directory-p path-remote)))) (if file-or-directory (progn (message "Downloading file '%s' to '%s'.. (synchronously)" path-r= emote path-local) (copy-file path-remote path-local t t t t) (message "Download of file '%s' finished. (synchronously)" path-l= ocal)) (progn (message "Downloading directory '%s' to '%s'.. (synchronously)" pat= h-remote path-local) (copy-directory path-remote path-local t t t) (message "Download of directory '%s' finished. (synchronously)" path-local)))) The file .error-log will be transferred locally to .error-log/.error-log instead of .error-log. The filename does not matter. It seems (file-regular-p) mistakes remote files over TRAMP FTP more often than (file-directory-p). Maybe that is the cause of this problem. In GNU Emacs 26.0.60 (build 13, x86_64-apple-darwin17.3.0, NS appkit-1561.2= 0 Version 10.13.2 (Build 17C205)) of 2018-02-19 built on Christians-iMac Repository revision: 020734c0e1a7ed8534df29992ffc4228d3663d89 Windowing system distributor 'Apple', version 10.3.1561 Recent messages: Getting /ftp:ftpuser@ftphost:/remotepath/style.css...done Getting /ftp:ftpuser@ftphost:/remotepath/travel-tips.php...done Differences calculated between directory =E2=80=99/localpath/=E2=80=99 and = =E2=80=99/ftp:ftpuser@ftphost:/remotepath/=E2=80=99 -> 0 only in A, 2 only = in B, 0 differs. (synchronously) previous-line: Beginning of buffer [6 times] Downloading file =E2=80=99/ftp:ftpuser@ftphost:/remotepath/.error-log=E2=80= =99 to =E2=80=99/localpath/.error-log=E2=80=99.. (synchronously) > ftp:ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/... > p:ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/...5k > :ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/...21k > ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/...done Download of file =E2=80=99/localpath/.error-log=E2=80=99 finished. (synchro= nously) Quit [2 times] Configured features: JPEG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS LCMS2 Important settings: value of $LANG: sv_SE.UTF-8 locale-coding-system: utf-8-unix Major mode: Messages Minor modes in effect: show-paren-mode: t save-place-mode: t helm-mode: t helm-autoresize-mode: t global-flycheck-mode: t global-hl-todo-mode: t global-diff-hl-mode: t diff-auto-refine-mode: t global-auto-complete-mode: t dired-async-mode: t editorconfig-mode: t yas-global-mode: t yas-minor-mode: t override-global-mode: t ido-everywhere: t display-time-mode: t winner-mode: t electric-pair-mode: t desktop-save-mode: t global-semantic-mru-bookmark-mode: t global-semanticdb-minor-mode: t global-semantic-idle-completions-mode: t global-semantic-idle-scheduler-mode: t global-semantic-idle-local-symbol-highlight-mode: t global-semantic-idle-summary-mode: t global-semantic-decoration-mode: t global-semantic-highlight-func-mode: t global-semantic-stickyfunc-mode: t semantic-mode: t global-ede-mode: t delete-selection-mode: t global-whitespace-mode: t which-function-mode: t shell-dirtrack-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-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 buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy hides /Users/chris= tianjohansson/.emacs.d/elpa/ssh-deploy-20180218.704/ssh-deploy /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-diff-mode hides /U= sers/christianjohansson/.emacs.d/elpa/ssh-deploy-20180218.704/ssh-deploy-di= ff-mode /Users/christianjohansson/.emacs.d/elpa/less-css-mode-20160930.2153/less-cs= s-mode hides /Users/christianjohansson/Documents/remacs/lisp/textmodes/less= -css-mode Features: (shadow sort mail-extr ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util tramp-cache conf-mode ange-ftp tramp-ftp ede/dired helm-semantic helm-imenu vc-git emacsbug message puny rfc822 mml mml-sec epa derived epg 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 helm-command helm-elisp helm-eval edebug helm-info display-line-numbers rainbow-mode color flycheck-rust flycheck-color-mode-line face-remap auto-package-update ts-comint tss log4e json-mode json-reformat json-snatcher smartparens-javascript js smartparens-html sgml-mode dom tide tide-lv typescript-mode smarty-mode paren saveplace restclient helm-mode helm-files helm-buffers helm-tags helm-locate helm-grep helm-regexp helm-utils helm-help helm-types helm helm-source helm-multi-match helm-lib flycheck-pos-tip pos-tip flycheck subr-x hl-todo diff-hl vc-dir ewoc vc vc-dispatcher diff-mode exec-path-from-shell ssh-deploy ssh-deploy-diff-mode ac-html ac-html-core ztree ztree-diff ztree-diff-model ztree-dir ztree-view ztree-util grunt hlinum linum ac-php auto-complete-config auto-complete ac-php-core popup phpcbf php-auto-yasnippets php-mode etags xref project add-log cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs web-beautify imenu-list reveal-in-osx-finder auto-dictionary flyspell ispell dired-async dired-aux dired dired-loaddefs async editorconfig server ansible-doc ecb ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload radix-tree lisp-mnt ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper ecb-semantic ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout ecb-compilation ecb-common-browser ecb-navigate eieio-compat ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-find semantic/db-ref semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn ecb-util flymake-rust flymake-easy flymake rust-playground time-stamp cargo cargo-process smartparens-rust rust-mode compile google-translate google-translate-default-ui google-translate-core-ui google-translate-core google-translate-tk url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap json map lorem-ipsum company smartparens-config smartparens-text smartparens thingatpt paredit ansible f yasnippet yaxception ht dash know-your-http-well http-status-codes http-relations http-methods http-headers s hydra lv cl-extra help-mode use-package up-delight up-diminish up-ensure up-core pcase cl bind-key easy-mmode ido time winner edmacro kmacro elec-pair desktop frameset semantic/mru-bookmark semantic/db-mode semantic/db semantic/idle semantic/format semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom wid-edit cedet delsel disp-table whitespace which-func imenu windmove base16-dracula-theme base16-theme tramp tramp-compat tramp-loaddefs trampver shell pcomplete comint ansi-color ring parse-time format-spec advice cus-start cus-load finder-inf rx info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util 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 kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 601023 38540) (symbols 48 54999 49) (miscs 40 1120 809) (strings 32 146615 15732) (string-bytes 1 4761875) (vectors 16 82947) (vector-slots 8 1371207 5634) (floats 8 426 907) (intervals 56 1355 232) (buffers 992 24)) From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Feb 2018 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151906266922603 (code B ref 30533); Mon, 19 Feb 2018 17:52:02 +0000 Received: (at 30533) by debbugs.gnu.org; 19 Feb 2018 17:51:09 +0000 Received: from localhost ([127.0.0.1]:51573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enpan-0005sV-Az for submit@debbugs.gnu.org; Mon, 19 Feb 2018 12:51:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enpal-0005sH-G1 for 30533@debbugs.gnu.org; Mon, 19 Feb 2018 12:51:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enpaf-0002gG-LK for 30533@debbugs.gnu.org; Mon, 19 Feb 2018 12:51:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enpad-0002ej-H3; Mon, 19 Feb 2018 12:50:59 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1enpac-0008MX-OS; Mon, 19 Feb 2018 12:50:58 -0500 From: Glenn Morris References: X-Spook: Radiation Organized crime virus Gulf Cartel Hezbollah red X-Ran: ^k{)7V+x{(sih0*Ef9+"vAU_|K9ywoqj8J5mN`/L)zNZt7MvzPVKEkb/|s{SoBd%7IE#Z} X-Hue: brightgreen X-Attribution: GM Date: Mon, 19 Feb 2018 12:50:58 -0500 In-Reply-To: (Christian Johansson's message of "Mon, 19 Feb 2018 09:18:33 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Christian Johansson wrote: > In GNU Emacs 26.0.60 (build 13, x86_64-apple-darwin17.3.0, NS appkit-1561.20 Version 10.13.2 (Build 17C205)) > of 2018-02-19 built on Christians-iMac > Repository revision: 020734c0e1a7ed8534df29992ffc4228d3663d89 26.0.60 is a rather old development version (before last October), and furthermore the git revision doesn't seem to correspond to anything in the Emacs repository. From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2018 06:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 30533@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.151910798312344 (code B ref -1); Tue, 20 Feb 2018 06:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Feb 2018 06:26:23 +0000 Received: from localhost ([127.0.0.1]:52033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo1Ne-0003D1-V3 for submit@debbugs.gnu.org; Tue, 20 Feb 2018 01:26:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo07W-0000x0-99 for submit@debbugs.gnu.org; Tue, 20 Feb 2018 00:05:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eo07P-0001XQ-5R for submit@debbugs.gnu.org; Tue, 20 Feb 2018 00:05:33 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eo07O-0001X3-UJ for submit@debbugs.gnu.org; Tue, 20 Feb 2018 00:05:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo07M-0006tk-MK for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 00:05:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eo07I-0001Lt-E3 for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 00:05:28 -0500 Received: from cvj.se ([31.192.230.63]:53321) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eo07H-00017b-Tl for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 00:05:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=IXwp0e9M7XpSKoQ3YTD62+LEQj5I3IwYMGMNi1p8RrY=; b=NFOZYntFRQg+XsW3iCZl19ZRGRzJ49zpaiUf2g1LDchpv7GnGRkSqB1NvY2DfhuxSOoVeCFKYcgA9CSxRPf/Qx1rEBs/h8VGG2UVREi4dWMnR8ieABGrydMqlWXtugSZGbp3cIddNSROsC2dFg41tzqawJnFk5urN2HImsI38tI=; Received: from c-efd370d5.011-155-65736b4.cust.bredbandsbolaget.se ([213.112.211.239] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eo068-0002ki-Jv for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 06:04:13 +0100 References: From: Christian Johansson Message-ID: Date: Tue, 20 Feb 2018 06:04:11 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Mailman-Approved-At: Tue, 20 Feb 2018 01:26:21 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Ok problem reproduced with latest trunk. Output: Downloading directory ’/ftp:ftpuser@ftphost.com:/remotepath/app.php’ to ’/localpath/app.php’.. (synchronously) tramp-file-name-handler: Opening directory: Not a directory, /ftp:ftpuser@ftphost.com:/remotepath/app.php After running: (defun ssh-deploy--download-via-tramp (path-remote path-local revision-folder)   "Download PATH-REMOTE to PATH-LOCAL via TRAMP synchronously and store a copy in REVISION-FOLDER."   (let ((file-or-directory (file-regular-p path-remote)))     (if file-or-directory         (progn           (message "Downloading file '%s' to '%s'.. (synchronously)" path-remote path-local)           (copy-file path-remote path-local t t t t)           (ssh-deploy-store-revision path-local revision-folder)           (message "Download of file '%s' finished. (synchronously)" path-local))       (progn         (message "Downloading directory '%s' to '%s'.. (synchronously)" path-remote path-local)         (copy-directory path-remote path-local t t t)         (message "Download of directory '%s' finished. (synchronously)"   path-local))))) Where variables path-remote = /ftp:ftpuser@ftphost.com:/remotepath/app.php path-local = /localpath/app.php In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D47))  of 2018-02-19 built on Christians-MacBook-Air.local Repository revision: 071a0a571243f9498e0e58e5fe938a7b892a22db Windowing system distributor 'Apple', version 10.3.1561 System Description:  Mac OS X 10.13.3 Recent messages: Generating differences between directory ’/localpath/’ and ’/ftp:ftpuser@ftphost.com:/remotepath/’.. (synchronously) Differences calculated between directory ’/localpath/’ and ’/ftp:ftpuser@ftphost.com:/remotepath/’ -> 0 only in A, 1 only in B, 0 differs. (synchronously) funcall-interactively: Buffer is read-only: #> [3 times] Downloading directory ’/ftp:ftpuser@ftphost.com:/remotepath/app.php’ to ’/localpath/app.php’.. (synchronously) tramp-file-name-handler: Opening directory: Not a directory, /ftp:ftpuser@ftphost.com:/remotepath/app.php Reverting buffer ‘app.php’. Configured features: RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS Important settings:   value of $LC_CTYPE: UTF-8   value of $LANG: en_SE.UTF-8   locale-coding-system: utf-8-unix Major mode: SSH-Deploy-Diff Minor modes in effect:   flycheck-color-mode-line-mode: t   show-paren-mode: t   save-place-mode: t   helm-mode: t   helm-autoresize-mode: t   global-flycheck-mode: t   flycheck-mode: t   global-hl-todo-mode: t   global-diff-hl-mode: t   diff-auto-refine-mode: t   global-auto-complete-mode: t   dired-async-mode: t   editorconfig-mode: t   yas-global-mode: t   yas-minor-mode: t   override-global-mode: t   ido-everywhere: t   display-time-mode: t   winner-mode: t   electric-pair-mode: t   desktop-save-mode: t   global-semantic-mru-bookmark-mode: t   global-semanticdb-minor-mode: t   global-semantic-idle-completions-mode: t   global-semantic-idle-scheduler-mode: t   global-semantic-idle-local-symbol-highlight-mode: t   global-semantic-idle-summary-mode: t   global-semantic-decoration-mode: t   global-semantic-highlight-func-mode: t   global-semantic-stickyfunc-mode: t   semantic-mode: t   global-ede-mode: t   delete-selection-mode: t   global-whitespace-mode: t   which-function-mode: t   shell-dirtrack-mode: t   cl-old-struct-compat-mode: t   tooltip-mode: t   global-eldoc-mode: t   electric-indent-mode: t   mouse-wheel-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   buffer-read-only: t   column-number-mode: t   line-number-mode: t   transient-mark-mode: t Load-path shadows: /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20180216.736/ssh-deploy /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-diff-mode hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20180216.736/ssh-deploy-diff-mode /Users/christianjohansson/.emacs.d/elpa/less-css-mode-20160930.2153/less-css-mode hides /Users/christianjohansson/Documents/emacs/lisp/textmodes/less-css-mode Features: (shadow sort mail-extr emacsbug sendmail helm-command helm-elisp helm-eval edebug helm-info ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util tramp-cache conf-mode ange-ftp tramp-ftp eww mm-url url-queue shr svg xml browse-url ac-racer racer semantic/bovine/c semantic/decorate/include hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/dep semantic/bovine semantic/analyze/refs ede/dired twig-mode semantic/imenu semantic/sb semantic/db-file data-debug cedet-files semantic/wisent/javascript-jv semantic/wisent/js-wy semantic/wisent semantic/wisent/wisent semantic/java semantic/doc tern url-http url-auth url-gw nsm display-line-numbers rainbow-mode color cursor-sensor js2-mode autorevert filenotify vc-git flycheck-rust flycheck-color-mode-line face-remap org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m editorconfig-core editorconfig-core-handle editorconfig-fnmatch org-element avl-tree generator smartparens-org org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs auto-package-update ts-comint tss log4e json-mode json-reformat json-snatcher smartparens-javascript js smartparens-html sgml-mode dom tide tide-lv typescript-mode smarty-mode paren saveplace restclient helm-mode helm-files helm-buffers helm-tags helm-locate helm-grep helm-regexp helm-utils helm-help helm-types helm helm-source helm-multi-match helm-lib flycheck-pos-tip pos-tip flycheck subr-x hl-todo diff-hl vc-dir ewoc vc vc-dispatcher diff-mode exec-path-from-shell ssh-deploy ssh-deploy-diff-mode ac-html ac-html-core ztree ztree-diff ztree-diff-model ztree-dir ztree-view ztree-util grunt hlinum linum ac-php auto-complete-config auto-complete ac-php-core popup phpcbf php-auto-yasnippets php-mode cc-langs etags xref project add-log cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs web-beautify imenu-list reveal-in-osx-finder auto-dictionary flyspell ispell dired-async dired-aux dired dired-loaddefs async editorconfig server ansible-doc ecb ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload radix-tree lisp-mnt ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper ecb-semantic ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout ecb-compilation ecb-common-browser ecb-navigate eieio-compat ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-find semantic/db-ref semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn ecb-util flymake-rust flymake-easy flymake-proc flymake warnings rust-playground time-stamp cargo cargo-process smartparens-rust rust-mode compile google-translate google-translate-default-ui google-translate-core-ui google-translate-core google-translate-tk url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap lorem-ipsum company smartparens-config smartparens-text smartparens thingatpt paredit ansible f yasnippet yaxception ht dash know-your-http-well http-status-codes http-relations http-methods http-headers s hydra lv cl-extra help-mode use-package up-delight up-diminish up-ensure up-core pcase cl bind-key easy-mmode ido time winner edmacro kmacro elec-pair desktop frameset semantic/mru-bookmark semantic/db-mode semantic/db semantic/idle semantic/format semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom wid-edit cedet delsel disp-table whitespace which-func imenu windmove tramp trampver tramp-compat tramp-loaddefs shell pcomplete comint ansi-color ring parse-time format-spec advice base16-circus-theme base16-theme time-date finder-inf rx info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 934525 73980)  (symbols 48 70113 11)  (miscs 40 1160 1857)  (strings 32 197950 10494)  (string-bytes 1 6490921)  (vectors 16 112100)  (vector-slots 8 2419803 161810)  (floats 8 597 408)  (intervals 56 44366 1236)  (buffers 992 49)) On 2018-02-19 18:50, Glenn Morris wrote: > Christian Johansson wrote: > >> In GNU Emacs 26.0.60 (build 13, x86_64-apple-darwin17.3.0, NS appkit-1561.20 Version 10.13.2 (Build 17C205)) >> of 2018-02-19 built on Christians-iMac >> Repository revision: 020734c0e1a7ed8534df29992ffc4228d3663d89 > 26.0.60 is a rather old development version (before last October), and > furthermore the git revision doesn't seem to correspond to anything in > the Emacs repository. > > > From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2018 15:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.15191392113862 (code B ref 30533); Tue, 20 Feb 2018 15:07:02 +0000 Received: (at 30533) by debbugs.gnu.org; 20 Feb 2018 15:06:51 +0000 Received: from localhost ([127.0.0.1]:53034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo9VK-00010E-Po for submit@debbugs.gnu.org; Tue, 20 Feb 2018 10:06:50 -0500 Received: from mout.gmx.net ([212.227.17.22]:36779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo9VJ-0000zv-K4 for 30533@debbugs.gnu.org; Tue, 20 Feb 2018 10:06:50 -0500 Received: from detlef.gmx.de ([212.86.54.29]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6874-1eZUAi24mw-00y6yn; Tue, 20 Feb 2018 16:06:42 +0100 From: Michael Albinus References: Date: Tue, 20 Feb 2018 16:06:41 +0100 In-Reply-To: (Christian Johansson's message of "Mon, 19 Feb 2018 09:18:33 +0100") Message-ID: <877er74s5a.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:3HUvJNjyjp+1/zgnWx+3mipG8F/N0B/Dkh5LzLK7fbd8WBijpkp zUg6C8YEyzh5C0MahNOM/0NdMHTnJuEF7dUiSkiTvt1Xrg8PrxUGvtD2wmkrMGCQFg8bca6 Ot5NZBiLFFF3g6mdecZYvUgb8iu52v6Ojch9z3wAa0KW6LSwde1uH8IPNmAJ4gOAJ9ftKGF usJ4ibTeIPn/D/w78FR+A== X-UI-Out-Filterresults: notjunk:1;V01:K0:pxWdwT/Lo/Y=:7FceT0KPtWE6VP3+azg0kQ 6IxSS3hRhtm5R7aljwb26uqO9x3UajOAFJGVJO92u5uQZaxjDV3kPlZjlzRzssiITOLlnEsl7 id9bujJ7wEO3ZRWxjeLsTDiQvOsf61lo1jHTJJQikNrYH8PuIL+/Yy3jSjWEAqcy3a7TK4vLD bzJH/OGnuknOMNnPkL4ab1UHuAymFPoIwni7Ogh6+8k+LfMdcFlDYNYhHKnzx79Xklf1JvvbL zjiz9r2jj2JvVnBofke0FfjdXSAyuV0r2omFNwVo3ncYMGpHhBYTpuhGEZfbLxEIWVMmAL5Id OTS/AY6lUCAsJpPXxzJaQ5Zhu84WBoVBAah5yAmetjevwIyxJTH8WDa2/pESTzvsF2ONyJFVo rheHAzkx11dioIoU4TZrq755ZPpHw/4mHKto2e4QpwNjtAlAV4mMim6jtUz4lEBJrQqvia4K1 Ale/UVIONsmkHCPJSHdIh+ujVUQjXrqzi14hCxqv5qj2h6AfiKgmZmOBvcgtEK96HLW93GqSy 6KAjMKt0Tt4qr+IgAPdrKcVGst+Pq/nLwPZJHVCVhWdFL3iL4s1hHGKJc/UqRv38oPR9HnSCI MYT9jVgCkPgI/gCC3u8elQDhJxR4jECr/5BRaEQ5Zs+Ojetqfb2yElJ0rQx12l7H8yjPC0Azd GaOZOEJeY+vY7ol5iA3vCHrlOd3b7qxGHxIaW6goh266Oh+TLsOv36prfXoFnKiqna72DFbOo HSQ8590oy952lDp/pt/GDqu5wE6aOdAB7b8rug1KaKKsf91Vi68SOvmzvuVlrHD+nuhYwY/38 ou1MQ+ombiCOA31y5P9KkcyC6zYaPKWu5pOTRHMAMI7njuURx8= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Christian Johansson writes: Hi Chrsitian, > I have a case where Emacs have trouble understanding whether a remote > file is a file or a directory, I run this code where PATH-LOCAL is on > localhost and PATH-REMOTE is on a remote FTP via TRAMP > > (let ((file-or-directory (not (file-directory-p path-remote)))) > (if file-or-directory > (progn > (message "Downloading file '%s' to '%s'.. (synchronously)" path-remote path-local) > (copy-file path-remote path-local t t t t) > (message "Download of file '%s' finished. (synchronously)" path-local)) > (progn > (message "Downloading directory '%s' to '%s'.. (synchronously)" path-remote path-local) > (copy-directory path-remote path-local t t t) > (message "Download of directory '%s' finished. (synchronously)" > path-local)))) > > The file .error-log will be transferred locally to .error-log/.error-log > instead of .error-log. The filename does not matter. > > It seems (file-regular-p) mistakes remote files over TRAMP FTP more > often than (file-directory-p). Maybe that is the cause of this problem. I have problems in reproducing the scenario. Coul you, pls, give examples of PATH-LOCAL and PATH-REMOTE? It is also important to know, whether PATH-LOCAL is an existing file or directory. Also, in case of a directory, it is important to know, whether the string PATH_LOCAL has a trailing slash. Thanks, and best regards, Michael. From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2018 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151914457519448 (code B ref 30533); Tue, 20 Feb 2018 16:37:02 +0000 Received: (at 30533) by debbugs.gnu.org; 20 Feb 2018 16:36:15 +0000 Received: from localhost ([127.0.0.1]:53088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoAtq-00053b-3N for submit@debbugs.gnu.org; Tue, 20 Feb 2018 11:36:15 -0500 Received: from cvj.se ([31.192.230.63]:34234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo5gt-0001OA-Qs for 30533@debbugs.gnu.org; Tue, 20 Feb 2018 06:02:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=TeDlgrtPP9msV6eagACUc2Eu3498ObhdMp3S7BZRLjE=; b=gH3+ANoNyMD3gy+4zMs5H0CVtEO7TlFHtKHFhlIuhTomx1Jkl/LvhDncNi8kNdgy4TUW8zC3CbzYP3CR9310JdbWGzJf1SSnY/my64QiANdwvDakNnAeyt/oii1uiGoXaZMBktUjg6kewev+WB0iznT/i4xBP1MaK0ZgkOzXwac=; Received: from a077.broadband2.quicknet.se ([92.43.32.77] helo=[192.168.1.94]) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eo5gr-0004XV-11 for 30533@debbugs.gnu.org; Tue, 20 Feb 2018 12:02:30 +0100 References: From: Christian Johansson Message-ID: Date: Tue, 20 Feb 2018 12:02:22 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------F542B60C3F50775AD736CF72" Content-Language: en-US X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Tue, 20 Feb 2018 11:36:12 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a multi-part message in MIME format. --------------F542B60C3F50775AD736CF72 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Ok problem reproduced with latest trunk. Output: Downloading directory ’/ftp:ftpuser@ftphost.com:/remotepath/app.php’ to ’/localpath/app.php’.. (synchronously) tramp-file-name-handler: Opening directory: Not a directory, /ftp:ftpuser@ftphost.com:/remotepath/app.php After running: (defun ssh-deploy--download-via-tramp (path-remote path-local revision-folder)   "Download PATH-REMOTE to PATH-LOCAL via TRAMP synchronously and store a copy in REVISION-FOLDER."   (let ((file-or-directory (file-regular-p path-remote)))     (if file-or-directory         (progn           (message "Downloading file '%s' to '%s'.. (synchronously)" path-remote path-local)           (copy-file path-remote path-local t t t t)           (ssh-deploy-store-revision path-local revision-folder)           (message "Download of file '%s' finished. (synchronously)" path-local))       (progn         (message "Downloading directory '%s' to '%s'.. (synchronously)" path-remote path-local)         (copy-directory path-remote path-local t t t)         (message "Download of directory '%s' finished. (synchronously)"   path-local))))) Where variables path-remote = /ftp:ftpuser@ftphost.com:/remotepath/app.php path-local = /localpath/app.php In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D47))  of 2018-02-19 built on Christians-MacBook-Air.local Repository revision: 071a0a571243f9498e0e58e5fe938a7b892a22db Windowing system distributor 'Apple', version 10.3.1561 System Description:  Mac OS X 10.13.3 Recent messages: Generating differences between directory ’/localpath/’ and ’/ftp:ftpuser@ftphost.com:/remotepath/’.. (synchronously) Differences calculated between directory ’/localpath/’ and ’/ftp:ftpuser@ftphost.com:/remotepath/’ -> 0 only in A, 1 only in B, 0 differs. (synchronously) funcall-interactively: Buffer is read-only: #> [3 times] Downloading directory ’/ftp:ftpuser@ftphost.com:/remotepath/app.php’ to ’/localpath/app.php’.. (synchronously) tramp-file-name-handler: Opening directory: Not a directory, /ftp:ftpuser@ftphost.com:/remotepath/app.php Reverting buffer ‘app.php’. Configured features: RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS Important settings:   value of $LC_CTYPE: UTF-8   value of $LANG: en_SE.UTF-8   locale-coding-system: utf-8-unix Major mode: SSH-Deploy-Diff Minor modes in effect:   flycheck-color-mode-line-mode: t   show-paren-mode: t   save-place-mode: t   helm-mode: t   helm-autoresize-mode: t   global-flycheck-mode: t   flycheck-mode: t   global-hl-todo-mode: t   global-diff-hl-mode: t   diff-auto-refine-mode: t   global-auto-complete-mode: t   dired-async-mode: t   editorconfig-mode: t   yas-global-mode: t   yas-minor-mode: t   override-global-mode: t   ido-everywhere: t   display-time-mode: t   winner-mode: t   electric-pair-mode: t   desktop-save-mode: t   global-semantic-mru-bookmark-mode: t   global-semanticdb-minor-mode: t   global-semantic-idle-completions-mode: t   global-semantic-idle-scheduler-mode: t   global-semantic-idle-local-symbol-highlight-mode: t   global-semantic-idle-summary-mode: t   global-semantic-decoration-mode: t   global-semantic-highlight-func-mode: t   global-semantic-stickyfunc-mode: t   semantic-mode: t   global-ede-mode: t   delete-selection-mode: t   global-whitespace-mode: t   which-function-mode: t   shell-dirtrack-mode: t   cl-old-struct-compat-mode: t   tooltip-mode: t   global-eldoc-mode: t   electric-indent-mode: t   mouse-wheel-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   buffer-read-only: t   column-number-mode: t   line-number-mode: t   transient-mark-mode: t Load-path shadows: /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20180216.736/ssh-deploy /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-diff-mode hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20180216.736/ssh-deploy-diff-mode /Users/christianjohansson/.emacs.d/elpa/less-css-mode-20160930.2153/less-css-mode hides /Users/christianjohansson/Documents/emacs/lisp/textmodes/less-css-mode Features: (shadow sort mail-extr emacsbug sendmail helm-command helm-elisp helm-eval edebug helm-info ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util tramp-cache conf-mode ange-ftp tramp-ftp eww mm-url url-queue shr svg xml browse-url ac-racer racer semantic/bovine/c semantic/decorate/include hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/dep semantic/bovine semantic/analyze/refs ede/dired twig-mode semantic/imenu semantic/sb semantic/db-file data-debug cedet-files semantic/wisent/javascript-jv semantic/wisent/js-wy semantic/wisent semantic/wisent/wisent semantic/java semantic/doc tern url-http url-auth url-gw nsm display-line-numbers rainbow-mode color cursor-sensor js2-mode autorevert filenotify vc-git flycheck-rust flycheck-color-mode-line face-remap org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m editorconfig-core editorconfig-core-handle editorconfig-fnmatch org-element avl-tree generator smartparens-org org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs auto-package-update ts-comint tss log4e json-mode json-reformat json-snatcher smartparens-javascript js smartparens-html sgml-mode dom tide tide-lv typescript-mode smarty-mode paren saveplace restclient helm-mode helm-files helm-buffers helm-tags helm-locate helm-grep helm-regexp helm-utils helm-help helm-types helm helm-source helm-multi-match helm-lib flycheck-pos-tip pos-tip flycheck subr-x hl-todo diff-hl vc-dir ewoc vc vc-dispatcher diff-mode exec-path-from-shell ssh-deploy ssh-deploy-diff-mode ac-html ac-html-core ztree ztree-diff ztree-diff-model ztree-dir ztree-view ztree-util grunt hlinum linum ac-php auto-complete-config auto-complete ac-php-core popup phpcbf php-auto-yasnippets php-mode cc-langs etags xref project add-log cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs web-beautify imenu-list reveal-in-osx-finder auto-dictionary flyspell ispell dired-async dired-aux dired dired-loaddefs async editorconfig server ansible-doc ecb ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload radix-tree lisp-mnt ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper ecb-semantic ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout ecb-compilation ecb-common-browser ecb-navigate eieio-compat ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-find semantic/db-ref semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn ecb-util flymake-rust flymake-easy flymake-proc flymake warnings rust-playground time-stamp cargo cargo-process smartparens-rust rust-mode compile google-translate google-translate-default-ui google-translate-core-ui google-translate-core google-translate-tk url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap lorem-ipsum company smartparens-config smartparens-text smartparens thingatpt paredit ansible f yasnippet yaxception ht dash know-your-http-well http-status-codes http-relations http-methods http-headers s hydra lv cl-extra help-mode use-package up-delight up-diminish up-ensure up-core pcase cl bind-key easy-mmode ido time winner edmacro kmacro elec-pair desktop frameset semantic/mru-bookmark semantic/db-mode semantic/db semantic/idle semantic/format semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom wid-edit cedet delsel disp-table whitespace which-func imenu windmove tramp trampver tramp-compat tramp-loaddefs shell pcomplete comint ansi-color ring parse-time format-spec advice base16-circus-theme base16-theme time-date finder-inf rx info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 934525 73980)  (symbols 48 70113 11)  (miscs 40 1160 1857)  (strings 32 197950 10494)  (string-bytes 1 6490921)  (vectors 16 112100)  (vector-slots 8 2419803 161810)  (floats 8 597 408)  (intervals 56 44366 1236)  (buffers 992 49)) On 2018-02-19 18:50, Glenn Morris wrote: > Christian Johansson wrote: > >> In GNU Emacs 26.0.60 (build 13, x86_64-apple-darwin17.3.0, NS appkit-1561.20 Version 10.13.2 (Build 17C205)) >> of 2018-02-19 built on Christians-iMac >> Repository revision: 020734c0e1a7ed8534df29992ffc4228d3663d89 > 26.0.60 is a rather old development version (before last October), and > furthermore the git revision doesn't seem to correspond to anything in > the Emacs repository. > > > --------------F542B60C3F50775AD736CF72 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Ok problem reproduced with latest trunk.

Output:

Downloading directory ’/ftp:ftpuser@ftphost.com:/remotepath/app.php’ to ’/localpath/app.php’.. (synchronously)
tramp-file-name-handler: Opening directory: Not a directory, /ftp:ftpuser@ftphost.com:/remotepath/app.php

After running:

(defun ssh-deploy--download-via-tramp (path-remote path-local revision-folder)
  "Download PATH-REMOTE to PATH-LOCAL via TRAMP synchronously and store a copy in REVISION-FOLDER."
  (let ((file-or-directory (file-regular-p path-remote)))
    (if file-or-directory
        (progn
          (message "Downloading file '%s' to '%s'.. (synchronously)" path-remote path-local)
          (copy-file path-remote path-local t t t t)
          (ssh-deploy-store-revision path-local revision-folder)
          (message "Download of file '%s' finished. (synchronously)" path-local))
      (progn
        (message "Downloading directory '%s' to '%s'.. (synchronously)" path-remote path-local)
        (copy-directory path-remote path-local t t t)
        (message "Download of directory '%s' finished. (synchronously)"
  path-local)))))

Where variables
path-remote =
/ftp:ftpuser@ftphost.com:/remotepath/app.php
path-local = /localpath/app.php




In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D47))
 of 2018-02-19 built on Christians-MacBook-Air.local
Repository revision: 071a0a571243f9498e0e58e5fe938a7b892a22db
Windowing system distributor 'Apple', version 10.3.1561
System Description:  Mac OS X 10.13.3

Recent messages:
Generating differences between directory ’/localpath/’ and ’/ftp:ftpuser@ftphost.com:/remotepath/’.. (synchronously)
Differences calculated between directory ’/localpath/’ and ’/ftp:ftpuser@ftphost.com:/remotepath/’ -> 0 only in A, 1 only in B, 0 differs. (synchronously)
funcall-interactively: Buffer is read-only: #<buffer ssh-deploy diff<3>> [3 times]
Downloading directory ’/ftp:ftpuser@ftphost.com:/remotepath/app.php’ to ’/localpath/app.php’.. (synchronously)
tramp-file-name-handler: Opening directory: Not a directory, /ftp:ftpuser@ftphost.com:/remotepath/app.php
Reverting buffer ‘app.php’.

Configured features:
RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
THREADS

Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_SE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: SSH-Deploy-Diff

Minor modes in effect:
  flycheck-color-mode-line-mode: t
  show-paren-mode: t
  save-place-mode: t
  helm-mode: t
  helm-autoresize-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  global-hl-todo-mode: t
  global-diff-hl-mode: t
  diff-auto-refine-mode: t
  global-auto-complete-mode: t
  dired-async-mode: t
  editorconfig-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  override-global-mode: t
  ido-everywhere: t
  display-time-mode: t
  winner-mode: t
  electric-pair-mode: t
  desktop-save-mode: t
  global-semantic-mru-bookmark-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-completions-mode: t
  global-semantic-idle-scheduler-mode: t
  global-semantic-idle-local-symbol-highlight-mode: t
  global-semantic-idle-summary-mode: t
  global-semantic-decoration-mode: t
  global-semantic-highlight-func-mode: t
  global-semantic-stickyfunc-mode: t
  semantic-mode: t
  global-ede-mode: t
  delete-selection-mode: t
  global-whitespace-mode: t
  which-function-mode: t
  shell-dirtrack-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20180216.736/ssh-deploy
/Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-diff-mode hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20180216.736/ssh-deploy-diff-mode
/Users/christianjohansson/.emacs.d/elpa/less-css-mode-20160930.2153/less-css-mode hides /Users/christianjohansson/Documents/emacs/lisp/textmodes/less-css-mode

Features:
(shadow sort mail-extr emacsbug sendmail helm-command helm-elisp
helm-eval edebug helm-info ediff-merg ediff-wind ediff-diff ediff-mult
ediff-help ediff-init ediff-util tramp-cache conf-mode ange-ftp
tramp-ftp eww mm-url url-queue shr svg xml browse-url ac-racer racer
semantic/bovine/c semantic/decorate/include hideif semantic/bovine/c-by
semantic/lex-spp semantic/bovine/gcc semantic/dep semantic/bovine
semantic/analyze/refs ede/dired twig-mode semantic/imenu semantic/sb
semantic/db-file data-debug cedet-files semantic/wisent/javascript-jv
semantic/wisent/js-wy semantic/wisent semantic/wisent/wisent
semantic/java semantic/doc tern url-http url-auth url-gw nsm
display-line-numbers rainbow-mode color cursor-sensor js2-mode
autorevert filenotify vc-git flycheck-rust flycheck-color-mode-line
face-remap org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls
gnutls utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny
rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils mm-util mail-prsvr org-docview doc-view jka-compr image-mode
org-bibtex bibtex org-bbdb org-w3m editorconfig-core
editorconfig-core-handle editorconfig-fnmatch org-element avl-tree
generator smartparens-org org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu
calendar cal-loaddefs auto-package-update ts-comint tss log4e json-mode
json-reformat json-snatcher smartparens-javascript js smartparens-html
sgml-mode dom tide tide-lv typescript-mode smarty-mode paren saveplace
restclient helm-mode helm-files helm-buffers helm-tags helm-locate
helm-grep helm-regexp helm-utils helm-help helm-types helm helm-source
helm-multi-match helm-lib flycheck-pos-tip pos-tip flycheck subr-x
hl-todo diff-hl vc-dir ewoc vc vc-dispatcher diff-mode
exec-path-from-shell ssh-deploy ssh-deploy-diff-mode ac-html
ac-html-core ztree ztree-diff ztree-diff-model ztree-dir ztree-view
ztree-util grunt hlinum linum ac-php auto-complete-config auto-complete
ac-php-core popup phpcbf php-auto-yasnippets php-mode cc-langs etags
xref project add-log cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs web-beautify imenu-list
reveal-in-osx-finder auto-dictionary flyspell ispell dired-async
dired-aux dired dired-loaddefs async editorconfig server ansible-doc ecb
ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support
ecb-autogen autoload radix-tree lisp-mnt ecb-tod ecb-cycle ecb-eshell
ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper
ecb-semantic ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout
ecb-compilation ecb-common-browser ecb-navigate eieio-compat
ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper
semantic/db-find semantic/db-ref semantic/analyze semantic/sort
semantic/scope semantic/analyze/fcn ecb-util flymake-rust flymake-easy
flymake-proc flymake warnings rust-playground time-stamp cargo
cargo-process smartparens-rust rust-mode compile google-translate
google-translate-default-ui google-translate-core-ui
google-translate-core google-translate-tk url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap lorem-ipsum company smartparens-config smartparens-text
smartparens thingatpt paredit ansible f yasnippet yaxception ht dash
know-your-http-well http-status-codes http-relations http-methods
http-headers s hydra lv cl-extra help-mode use-package up-delight
up-diminish up-ensure up-core pcase cl bind-key easy-mmode ido time
winner edmacro kmacro elec-pair desktop frameset semantic/mru-bookmark
semantic/db-mode semantic/db semantic/idle semantic/format semantic/ctxt
semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate
pulse semantic/util-modes semantic/util semantic semantic/tag
semantic/lex semantic/fw mode-local find-func ede/speedbar ede/files ede
ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar
speedbar sb-image ezimage dframe eieio-custom wid-edit cedet delsel
disp-table whitespace which-func imenu windmove tramp trampver
tramp-compat tramp-loaddefs shell pcomplete comint ansi-color ring
parse-time format-spec advice base16-circus-theme base16-theme time-date
finder-inf rx info package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq byte-opt gv bytecomp byte-compile
cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize
mule-util 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 kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 934525 73980)
 (symbols 48 70113 11)
 (miscs 40 1160 1857)
 (strings 32 197950 10494)
 (string-bytes 1 6490921)
 (vectors 16 112100)
 (vector-slots 8 2419803 161810)
 (floats 8 597 408)
 (intervals 56 44366 1236)
 (buffers 992 49))


On 2018-02-19 18:50, Glenn Morris wrote:
Christian Johansson wrote:

In GNU Emacs 26.0.60 (build 13, x86_64-apple-darwin17.3.0, NS appkit-1561.20 Version 10.13.2 (Build 17C205))
 of 2018-02-19 built on Christians-iMac
Repository revision: 020734c0e1a7ed8534df29992ffc4228d3663d89
26.0.60 is a rather old development version (before last October), and
furthermore the git revision doesn't seem to correspond to anything in
the Emacs repository.




--------------F542B60C3F50775AD736CF72-- From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2018 16:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151914457519455 (code B ref 30533); Tue, 20 Feb 2018 16:37:03 +0000 Received: (at 30533) by debbugs.gnu.org; 20 Feb 2018 16:36:15 +0000 Received: from localhost ([127.0.0.1]:53090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoAtr-00053d-5E for submit@debbugs.gnu.org; Tue, 20 Feb 2018 11:36:15 -0500 Received: from cvj.se ([31.192.230.63]:52984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoABC-0003yt-Vw for 30533@debbugs.gnu.org; Tue, 20 Feb 2018 10:50:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=qNONswKOcBDKhUmr1PesstcTUmLCPrHvRCy9rSiSg6o=; b=o3TqDRf4peX9anRVOOxlkkBPpfzL3L3A6QgSyVlP8Tm5kIhWw1X6skZRHcMRRvU+Lahy1Q3/MYtOgE5Y/R1QUQi/i0zolDT9tAwaGGpNr9wieVuM92nTV+8DMks+xLrGrywxB8aa5KEihKvXpm4YnEKtvRasSQ/3tjDz/aAwQ3A=; Received: from m77-218-227-106.cust.tele2.se ([77.218.227.106] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eoABB-0004RS-2Y for 30533@debbugs.gnu.org; Tue, 20 Feb 2018 16:50:05 +0100 References: From: Christian Johansson Message-ID: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> Date: Tue, 20 Feb 2018 16:49:57 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Tue, 20 Feb 2018 11:36:12 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ok this doesn't work for me with latest trunk, this is a public ftp so you should be able to connect. (let ((remote-path "/ftp:anonymous@speedtest.tele2.net:/1KB.zip")       (local-path "~/Downloads/1KB.zip"))   (if (file-regular-p remote-path)       (progn     (message "File %s is a regular file" remote-path)     (copy-file remote-path local-path t t t t))     (progn       (message "File %s is a directory" remote-path)       (copy-directory remote-path local-path t t t)))) Messages: File /ftp:anonymous@speedtest.tele2.net:/1KB.zip is a directory tramp-file-name-handler: Opening directory: Not a directory, /ftp:anonymous@speedtest.tele2.net:/1KB.zip From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2018 06:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151919361211428 (code B ref 30533); Wed, 21 Feb 2018 06:14:02 +0000 Received: (at 30533) by debbugs.gnu.org; 21 Feb 2018 06:13:32 +0000 Received: from localhost ([127.0.0.1]:53543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoNem-0002yG-GA for submit@debbugs.gnu.org; Wed, 21 Feb 2018 01:13:32 -0500 Received: from cvj.se ([31.192.230.63]:60453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoNek-0002y5-HR for 30533@debbugs.gnu.org; Wed, 21 Feb 2018 01:13:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:References:To:From:Subject; bh=o/DJl+K0hzjj0jKjQOmy0vA3QyzRh+xgKPcYX4RIGhs=; b=dbqP/1WHW6steYayEmU5BymHpWZ1ABCrBFWOjNxXZhG7B/0cTVEbx8xiWhxzsBRIa/tfPvxSZmgKD/5rNbJd3ZPxcrGzh/ASLfJ+E3vvyWrkMtV9uxacwgev9CJFixEyVKtUfWAKt9GzYUH7r7seeVfZeaLnzOTDaJSXs6l5904=; Received: from m77-218-227-106.cust.tele2.se ([77.218.227.106] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eoNei-0001kJ-Gy for 30533@debbugs.gnu.org; Wed, 21 Feb 2018 07:13:29 +0100 From: Christian Johansson References: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> Message-ID: Date: Wed, 21 Feb 2018 07:13:21 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Here are two cases that display different tramp errors related to copy-file, but only if you don't open the remote path using dired-mode first. ;; Case 1 (let ((remote-path "/ftp:anonymous@speedtest.tele2.net:/1KB.zip")       (local-path "~/Downloads/1KB.zip"))   (if (file-directory-p remote-path)       (progn         (message "File %s is a directory" remote-path)         (copy-directory remote-path local-path t t t))     (progn       (message "File %s is not a directory" remote-path)       (copy-file remote-path local-path t t t t)))) ;; Case 2 (let ((remote-path "/ftp:anonymous@speedtest.tele2.net:/1KB.zip")       (local-path "~/Downloads/1KB.zip"))   (if (file-regular-p remote-path)       (progn         (message "File %s is a regular file" remote-path)         (copy-file remote-path local-path t t t t))     (progn       (message "File %s is not a regular file" remote-path)       (copy-directory remote-path local-path t t t)))) If I first open the path in dired mode (/ftp:anonymous@speedtest.tele2.net) then the operations work as expected. It seems that tramp stores information about remote file-system when accessing it in dired-mode. Even after restarting the problem seems to be gone when the remote path has been opened once in dired-mode. Is there some cache to this? On 2018-02-20 16:49, Christian Johansson wrote: > (let ((remote-path "/ftp:anonymous@speedtest.tele2.net:/1KB.zip") >       (local-path "~/Downloads/1KB.zip")) >   (if (file-regular-p remote-path) >       (progn >     (message "File %s is a regular file" remote-path) >     (copy-file remote-path local-path t t t t)) >     (progn >       (message "File %s is a directory" remote-path) >       (copy-directory remote-path local-path t t t)))) From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2018 13:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151921989629410 (code B ref 30533); Wed, 21 Feb 2018 13:32:02 +0000 Received: (at 30533) by debbugs.gnu.org; 21 Feb 2018 13:31:36 +0000 Received: from localhost ([127.0.0.1]:53687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoUUi-0007eI-Gn for submit@debbugs.gnu.org; Wed, 21 Feb 2018 08:31:36 -0500 Received: from mout.gmx.net ([212.227.17.22]:40435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoUUg-0007e1-AY for 30533@debbugs.gnu.org; Wed, 21 Feb 2018 08:31:35 -0500 Received: from detlef.gmx.de ([213.220.145.129]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MZfZi-1f3HHd2G0U-00LZKp; Wed, 21 Feb 2018 14:31:27 +0100 From: Michael Albinus References: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> Date: Wed, 21 Feb 2018 14:31:26 +0100 In-Reply-To: (Christian Johansson's message of "Wed, 21 Feb 2018 07:13:21 +0100") Message-ID: <87k1v6cvv5.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K0:IVL6dVysFHPCL8MrI3sNCNeRsN83MX5pZPAzvmcnPzZb6f/TG+P LWrDHj0pC7aG2H0trvKVbNLaY84WpTU818mAkexWEcBo769dmXtMLIJoq5FEdiUHakRlaem b4S7kU9G3xnzoit4GNiufYSAd9yJPYRasl2oxshbMH5WyoxljZaOPJs52xb0veC3qCIY4Bo a1DTYBdsZORBwgDgwYG+w== X-UI-Out-Filterresults: notjunk:1;V01:K0:5TF/XV68jUU=:C9DAcYBUiEkatGR1G9OzAN XwODxGfridM8C7HEOOdwmyxA1nk4+22WNwUQOa3XEFoMWeQqrZg3+xsseXZd59iLo32B1FMqn loCAtxwHQijanMCTuo/IEQDiW9kZl9uiGFTGqpsv9BOM2QshIgCVMcsGd4rVKQPvTbLE/vHJH O+5mOo4C1Q6aIu2iWxxsfP6c6KiL0eiOItU1GPQjeFS2QgpFJFBgKzA8V5Q31JJeaN/wQrxBi voQ6af8+/R7Rc6rcdot2lWZBVe+N4SNwxDU4itRWmvRHWXxuoNJ76m61QqKHx/Wb4ElOuiUbP azYuVhWxc1yP9rydB6yM0xciW42c9jhBnslYq+TUzRL/KGaAJe8Tpn567Oe1bQqH5bAwhsO/d Ip8yp6wSMSQMWBIswuZM8xK+MV+WNDD3EYY1rReBVYt3nmjtsufvVak0DFO0xYDxhqK0oBSrR yHBE8AI/wPMnP3iH4+uu/lCvcZ33LYcdAtJHY30Xqtib3aaslm+UDw5jeFnjA7cFMBMk7KtYT /3ViolASqTPTv4mexe0hzD9Fy6X0Rt1njFUwhaIuM/Ly0CfpaFqBbfdISsJfsbn78/rdK8hue Ie6dE6U8/YyJiGAG5RdCpAMJn1LOW78FeY9V6/eGx9kQzpTRRoYM523cAaeFltsMRUWXo8hyB NEINEhBOu6zVoSE+z6DfPVEY6bqRrRA73n+lWOg58PvV0+nfFBTvX/ap+tM5ey1kyviSE2ENX UC1HsFz75pnzjO2JR1hZ5JXI7qjPZ3buhFHuGiRuVbTWJ/0pMvn7IuLzmF/brq+FkPeO9hcpL WiKc8liapOgiCU6sqeCJJSDvkXUoQ== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Christian Johansson writes: Hi Christian, > Here are two cases that display different tramp errors related to > copy-file, but only if you don't open the remote path using dired-mode > first. Got it. In fact, ange-ftp has no file-regular-p implementation. I've added this, could you, pls, test: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index e62bee4499..a267fc6448 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3373,6 +3373,13 @@ ange-ftp-file-symlink-p (file-error nil)) (ange-ftp-real-file-symlink-p file))) +(defun ange-ftp-file-regular-p (file) + ;; Reuse Tramp's implementation. + (if (ange-ftp-ftp-name file) + (and (file-exists-p file) + (eq ?- (aref (file-attribute-modes (file-attributes file)) 0))) + (ange-ftp-real-file-regular-p file))) + (defun ange-ftp-file-exists-p (name) (setq name (expand-file-name name)) (if (ange-ftp-ftp-name name) @@ -4389,6 +4396,7 @@ ange-ftp-hook-function (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p) (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p) (put 'file-symlink-p 'ange-ftp 'ange-ftp-file-symlink-p) +(put 'file-regular-p 'ange-ftp 'ange-ftp-file-regular-p) (put 'delete-file 'ange-ftp 'ange-ftp-delete-file) (put 'verify-visited-file-modtime 'ange-ftp 'ange-ftp-verify-visited-file-modtime) @@ -4477,6 +4485,8 @@ ange-ftp-real-file-executable-p (ange-ftp-run-real-handler 'file-executable-p args)) (defun ange-ftp-real-file-symlink-p (&rest args) (ange-ftp-run-real-handler 'file-symlink-p args)) +(defun ange-ftp-real-file-regular-p (&rest args) + (ange-ftp-run-real-handler 'file-regular-p args)) (defun ange-ftp-real-delete-file (&rest args) (ange-ftp-run-real-handler 'delete-file args)) (defun ange-ftp-real-verify-visited-file-modtime (&rest args) --=-=-= Content-Type: text/plain Best regards, Michael. --=-=-=-- From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2018 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151923190416731 (code B ref 30533); Wed, 21 Feb 2018 16:52:02 +0000 Received: (at 30533) by debbugs.gnu.org; 21 Feb 2018 16:51:44 +0000 Received: from localhost ([127.0.0.1]:54688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoXcO-0004Lm-5l for submit@debbugs.gnu.org; Wed, 21 Feb 2018 11:51:44 -0500 Received: from cvj.se ([31.192.230.63]:51858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoXcK-0004Lc-MN for 30533@debbugs.gnu.org; Wed, 21 Feb 2018 11:51:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=DVx6JsnKipqNGL4nL99YcYnymRSF615K0k8RTOIr/vM=; b=e7C8bjlmaLgzvSuwmnWyBxSGKasCGfuJD/gBWdscrZk6O78zEHfjwy/Pj8Nbjpt3Cpe2ohsamT1sEJG7Q/ZkE70Zp76GsXa8z3bMJ1YZH974cq1NbGDwXZFHLC8Se2zO3SiuQqxbbqSDmkVlbu2+Y4sM1W4DT4SBC0KyhmT84ek=; Received: from c-efd370d5.011-155-65736b4.cust.bredbandsbolaget.se ([213.112.211.239] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eoXcI-0003Hd-Qp; Wed, 21 Feb 2018 17:51:39 +0100 References: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> <87k1v6cvv5.fsf@gmx.de> From: Christian Johansson Message-ID: Date: Wed, 21 Feb 2018 17:51:37 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <87k1v6cvv5.fsf@gmx.de> Content-Type: multipart/alternative; boundary="------------2819E42ECF470B6E7BBBB24B" Content-Language: en-US X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a multi-part message in MIME format. --------------2819E42ECF470B6E7BBBB24B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi! Great, how do I pull your changes? I can't find them in master and I have trouble finding a branch, should I just apply the same changes on my local environment? Regards Christian On 2018-02-21 14:31, Michael Albinus wrote: > Christian Johansson writes: > > Hi Christian, > >> Here are two cases that display different tramp errors related to >> copy-file, but only if you don't open the remote path using dired-mode >> first. > Got it. In fact, ange-ftp has no file-regular-p implementation. I've > added this, could you, pls, test: > > > > diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el > index e62bee4499..a267fc6448 100644 > --- a/lisp/net/ange-ftp.el > +++ b/lisp/net/ange-ftp.el > @@ -3373,6 +3373,13 @@ ange-ftp-file-symlink-p > (file-error nil)) > (ange-ftp-real-file-symlink-p file))) > > +(defun ange-ftp-file-regular-p (file) > + ;; Reuse Tramp's implementation. > + (if (ange-ftp-ftp-name file) > + (and (file-exists-p file) > + (eq ?- (aref (file-attribute-modes (file-attributes file)) 0))) > + (ange-ftp-real-file-regular-p file))) > + > (defun ange-ftp-file-exists-p (name) > (setq name (expand-file-name name)) > (if (ange-ftp-ftp-name name) > @@ -4389,6 +4396,7 @@ ange-ftp-hook-function > (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p) > (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p) > (put 'file-symlink-p 'ange-ftp 'ange-ftp-file-symlink-p) > +(put 'file-regular-p 'ange-ftp 'ange-ftp-file-regular-p) > (put 'delete-file 'ange-ftp 'ange-ftp-delete-file) > (put 'verify-visited-file-modtime 'ange-ftp > 'ange-ftp-verify-visited-file-modtime) > @@ -4477,6 +4485,8 @@ ange-ftp-real-file-executable-p > (ange-ftp-run-real-handler 'file-executable-p args)) > (defun ange-ftp-real-file-symlink-p (&rest args) > (ange-ftp-run-real-handler 'file-symlink-p args)) > +(defun ange-ftp-real-file-regular-p (&rest args) > + (ange-ftp-run-real-handler 'file-regular-p args)) > (defun ange-ftp-real-delete-file (&rest args) > (ange-ftp-run-real-handler 'delete-file args)) > (defun ange-ftp-real-verify-visited-file-modtime (&rest args) > > > Best regards, Michael. --------------2819E42ECF470B6E7BBBB24B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi!

Great, how do I pull your changes?

I can't find them in master and I have trouble finding a branch, should I just apply the same changes on my local environment?

Regards
Christian


On 2018-02-21 14:31, Michael Albinus wrote:
Christian Johansson <christian@cvj.se> writes:

Hi Christian,

Here are two cases that display different tramp errors related to
copy-file, but only if you don't open the remote path using dired-mode
first.
Got it. In fact, ange-ftp has no file-regular-p implementation. I've
added this, could you, pls, test:



diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index e62bee4499..a267fc6448 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3373,6 +3373,13 @@ ange-ftp-file-symlink-p
 	(file-error nil))
     (ange-ftp-real-file-symlink-p file)))
 
+(defun ange-ftp-file-regular-p (file)
+  ;; Reuse Tramp's implementation.
+  (if (ange-ftp-ftp-name file)
+      (and (file-exists-p file)
+       (eq ?- (aref (file-attribute-modes (file-attributes file)) 0)))
+    (ange-ftp-real-file-regular-p file)))
+
 (defun ange-ftp-file-exists-p (name)
   (setq name (expand-file-name name))
   (if (ange-ftp-ftp-name name)
@@ -4389,6 +4396,7 @@ ange-ftp-hook-function
 (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p)
 (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p)
 (put 'file-symlink-p 'ange-ftp 'ange-ftp-file-symlink-p)
+(put 'file-regular-p 'ange-ftp 'ange-ftp-file-regular-p)
 (put 'delete-file 'ange-ftp 'ange-ftp-delete-file)
 (put 'verify-visited-file-modtime 'ange-ftp
      'ange-ftp-verify-visited-file-modtime)
@@ -4477,6 +4485,8 @@ ange-ftp-real-file-executable-p
   (ange-ftp-run-real-handler 'file-executable-p args))
 (defun ange-ftp-real-file-symlink-p (&rest args)
   (ange-ftp-run-real-handler 'file-symlink-p args))
+(defun ange-ftp-real-file-regular-p (&rest args)
+  (ange-ftp-run-real-handler 'file-regular-p args))
 (defun ange-ftp-real-delete-file (&rest args)
   (ange-ftp-run-real-handler 'delete-file args))
 (defun ange-ftp-real-verify-visited-file-modtime (&rest args)


Best regards, Michael.

--------------2819E42ECF470B6E7BBBB24B-- From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2018 17:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151923276918110 (code B ref 30533); Wed, 21 Feb 2018 17:07:02 +0000 Received: (at 30533) by debbugs.gnu.org; 21 Feb 2018 17:06:09 +0000 Received: from localhost ([127.0.0.1]:54702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoXqK-0004i2-Qd for submit@debbugs.gnu.org; Wed, 21 Feb 2018 12:06:08 -0500 Received: from mout.gmx.net ([212.227.15.15]:39009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoXqI-0004hX-4o for 30533@debbugs.gnu.org; Wed, 21 Feb 2018 12:06:07 -0500 Received: from detlef.gmx.de ([213.220.145.129]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lt1eU-1edzvp2btK-012cKU; Wed, 21 Feb 2018 18:05:59 +0100 From: Michael Albinus References: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> <87k1v6cvv5.fsf@gmx.de> Date: Wed, 21 Feb 2018 18:05:58 +0100 In-Reply-To: (Christian Johansson's message of "Wed, 21 Feb 2018 17:51:37 +0100") Message-ID: <874lmaxog9.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:WilisYirgR5Cir5zAyGsH2ssvwpxVHjHyASD+Xvr2OFJzXYMR+X faBktLVIhcjA4IctJqxwR/KZlHS5TnZnCDudFr+OvqEM8gDqPfbpO/pdk9lkzZ6gFs0/JyC fcpj8rY9zXcVIc471JX8r4jQB/uh0wDJvv4hLM3EnDZm91ar/92G1qpN4g7g3maMXdm2ovr izzcCJqDdU/0baYfUxRzA== X-UI-Out-Filterresults: notjunk:1;V01:K0:oh1nBT4G//0=:F1Fg/tDr2Qsep8qIwYPING /SlNA73rjnMtJ43IaNGmq35asyw2dKnVkr9plKG/5gajGEknDJb9It8TfbG1rnqvx2+hHnis4 h8e/hAn4oOMmmLPICk4kt9S+KVPpQ/dycJsE6dioh+3o8LheeKtMiYfQ/lsAkMNQzl7+r79J4 I63ntu66SDQj5Q2TYjIMOOFsZjDO9pR2JwGB9ZcV2kXP2g5A6zzoURtUdjQ66IcFyVIKven0U 29V+u38LbvufdsMskm0IwelcqBP2qgYkm3u9qQkbepLNv5oIPoiOVEcegmml5gjNbhejcKhbo XtgF+wJN+z2aJQR1AsEm7nR/rgyDZp3SiZ6iLM8eeML6Ubu3yDfFRQppZlyNAK0UfszdNf0mb grfe0tOHRbs4RafowTa2emAtKEaqyw5nwG8iVZ4VNVGN2tQ4iNsQ2jcLRjo2s7ZMSDzlh0giI vLx2JQxdwcrhrRzScpcRTXvgoHUbO509jTXsNZ4ZvwiCSmWrhq6NfYYzvcXxLuLv1THGqnsfs od5Zm7DNH8x6lqS15iHPb8FfQxV3ShsEEAoxKmUZH8wLQNwwleOSuynI6F9WjOSunDiDKDkKw m4BmktzD5+eRa6q3WptfhstXcFh8PQMNIaMJxcdNVEmwUa9UxbbTn7mypvp7pz6aNz/on+ARi veKsSqmaGj6OPb/YeqLA1DTbr8CajMVbE1KonWnMuL7sE1+5aFcCC36TxyZjNXTonngllllX9 E2gSpDdCBXd8lwMV9QDlLyGg3MC8OSx8Pk6eq4MnrEZN0yltQHlgTMyXUsJnmjRAP22RAvB+V h2lU/3iJfMzeSiQBq+AKUE/HwUrwu34+2dSoV3I+eZxIzTUc+0= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Christian Johansson writes: > Hi! Hi Christian, > Great, how do I pull your changes? > > I can't find them in master and I have trouble finding a branch, > should I just apply the same changes on my local environment? I haven't pushed them yet, waiting for your feedback. Pls apply the patch locally. The patch was produced on the emacs-26 branch, so there might be a line number shift on master. Finally, I will commit it to master, when it works for you. > Regards > Christian Best regards, Michael. From unknown Fri Jun 20 18:25:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Feb 2018 05:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 30533@debbugs.gnu.org Received: via spool by 30533-submit@debbugs.gnu.org id=B30533.151927630327842 (code B ref 30533); Thu, 22 Feb 2018 05:12:01 +0000 Received: (at 30533) by debbugs.gnu.org; 22 Feb 2018 05:11:43 +0000 Received: from localhost ([127.0.0.1]:55147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eojAU-0007F0-LT for submit@debbugs.gnu.org; Thu, 22 Feb 2018 00:11:42 -0500 Received: from cvj.se ([31.192.230.63]:35435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eojAS-0007Eq-Hl for 30533@debbugs.gnu.org; Thu, 22 Feb 2018 00:11:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=5IZNHHFKdtPmYEyyYWt+zNe1k7yX9t2jR50Tu1rchnU=; b=iLYGoFDybPzKX3CQH18Ufjp7D6Zng3xKKENx4WEILzX6pK89uF9TutCFDGuyXm2p+XyelrzJAEjq5wmDChOrL2ynbkpwhnixgCmE2/cTFQKnguc1hl9Z+t5XIEJu/FNvrV+nbjc8oWaLHkChFeK4IFRnIhJxBePLmqqbPwfygfY=; Received: from c-efd370d5.011-155-65736b4.cust.bredbandsbolaget.se ([213.112.211.239] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eojA4-000288-2p; Thu, 22 Feb 2018 06:11:39 +0100 References: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> <87k1v6cvv5.fsf@gmx.de> From: Christian Johansson Message-ID: Date: Thu, 22 Feb 2018 06:11:13 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <87k1v6cvv5.fsf@gmx.de> Content-Type: multipart/alternative; boundary="------------D7781B034220ADD68CE72648" Content-Language: en-US X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a multi-part message in MIME format. --------------D7781B034220ADD68CE72648 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michael! Your fix fixed one of the issues. (file-regular-p) now works as expected over TRAMP ftp. I can't reproduce the other one right now. There must be some kind of cache influencing the other issue.. I deleted the tramp directory but it had no effect.. I'll make a new report if I find a way to reproduce the other issue. Regards Christian On 2018-02-21 14:31, Michael Albinus wrote: > Christian Johansson writes: > > Hi Christian, > >> Here are two cases that display different tramp errors related to >> copy-file, but only if you don't open the remote path using dired-mode >> first. > Got it. In fact, ange-ftp has no file-regular-p implementation. I've > added this, could you, pls, test: > > > > diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el > index e62bee4499..a267fc6448 100644 > --- a/lisp/net/ange-ftp.el > +++ b/lisp/net/ange-ftp.el > @@ -3373,6 +3373,13 @@ ange-ftp-file-symlink-p > (file-error nil)) > (ange-ftp-real-file-symlink-p file))) > > +(defun ange-ftp-file-regular-p (file) > + ;; Reuse Tramp's implementation. > + (if (ange-ftp-ftp-name file) > + (and (file-exists-p file) > + (eq ?- (aref (file-attribute-modes (file-attributes file)) 0))) > + (ange-ftp-real-file-regular-p file))) > + > (defun ange-ftp-file-exists-p (name) > (setq name (expand-file-name name)) > (if (ange-ftp-ftp-name name) > @@ -4389,6 +4396,7 @@ ange-ftp-hook-function > (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p) > (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p) > (put 'file-symlink-p 'ange-ftp 'ange-ftp-file-symlink-p) > +(put 'file-regular-p 'ange-ftp 'ange-ftp-file-regular-p) > (put 'delete-file 'ange-ftp 'ange-ftp-delete-file) > (put 'verify-visited-file-modtime 'ange-ftp > 'ange-ftp-verify-visited-file-modtime) > @@ -4477,6 +4485,8 @@ ange-ftp-real-file-executable-p > (ange-ftp-run-real-handler 'file-executable-p args)) > (defun ange-ftp-real-file-symlink-p (&rest args) > (ange-ftp-run-real-handler 'file-symlink-p args)) > +(defun ange-ftp-real-file-regular-p (&rest args) > + (ange-ftp-run-real-handler 'file-regular-p args)) > (defun ange-ftp-real-delete-file (&rest args) > (ange-ftp-run-real-handler 'delete-file args)) > (defun ange-ftp-real-verify-visited-file-modtime (&rest args) > > > Best regards, Michael. --------------D7781B034220ADD68CE72648 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi Michael!

Your fix fixed one of the issues. (file-regular-p) now works as expected over TRAMP ftp.

I can't reproduce the other one right now. There must be some kind of cache influencing the other issue.. I deleted the tramp directory but it had no effect.. I'll make a new report if I find a way to reproduce the other issue.

Regards
Christian


On 2018-02-21 14:31, Michael Albinus wrote:
Christian Johansson <christian@cvj.se> writes:

Hi Christian,

Here are two cases that display different tramp errors related to
copy-file, but only if you don't open the remote path using dired-mode
first.
Got it. In fact, ange-ftp has no file-regular-p implementation. I've
added this, could you, pls, test:



diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index e62bee4499..a267fc6448 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3373,6 +3373,13 @@ ange-ftp-file-symlink-p
 	(file-error nil))
     (ange-ftp-real-file-symlink-p file)))
 
+(defun ange-ftp-file-regular-p (file)
+  ;; Reuse Tramp's implementation.
+  (if (ange-ftp-ftp-name file)
+      (and (file-exists-p file)
+       (eq ?- (aref (file-attribute-modes (file-attributes file)) 0)))
+    (ange-ftp-real-file-regular-p file)))
+
 (defun ange-ftp-file-exists-p (name)
   (setq name (expand-file-name name))
   (if (ange-ftp-ftp-name name)
@@ -4389,6 +4396,7 @@ ange-ftp-hook-function
 (put 'file-readable-p 'ange-ftp 'ange-ftp-file-readable-p)
 (put 'file-executable-p 'ange-ftp 'ange-ftp-file-executable-p)
 (put 'file-symlink-p 'ange-ftp 'ange-ftp-file-symlink-p)
+(put 'file-regular-p 'ange-ftp 'ange-ftp-file-regular-p)
 (put 'delete-file 'ange-ftp 'ange-ftp-delete-file)
 (put 'verify-visited-file-modtime 'ange-ftp
      'ange-ftp-verify-visited-file-modtime)
@@ -4477,6 +4485,8 @@ ange-ftp-real-file-executable-p
   (ange-ftp-run-real-handler 'file-executable-p args))
 (defun ange-ftp-real-file-symlink-p (&rest args)
   (ange-ftp-run-real-handler 'file-symlink-p args))
+(defun ange-ftp-real-file-regular-p (&rest args)
+  (ange-ftp-run-real-handler 'file-regular-p args))
 (defun ange-ftp-real-delete-file (&rest args)
   (ange-ftp-run-real-handler 'delete-file args))
 (defun ange-ftp-real-verify-visited-file-modtime (&rest args)


Best regards, Michael.

--------------D7781B034220ADD68CE72648-- From unknown Fri Jun 20 18:25:00 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Christian Johansson Subject: bug#30533: closed (Re: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory) Message-ID: References: <87lgflfgc1.fsf@gmx.de> X-Gnu-PR-Message: they-closed 30533 X-Gnu-PR-Package: emacs Reply-To: 30533@debbugs.gnu.org Date: Thu, 22 Feb 2018 10:52:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1519296722-2878-1" This is a multi-part message in MIME format... ------------=_1519296722-2878-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 30533@debbugs.gnu.org. --=20 30533: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30533 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1519296722-2878-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 30533-done) by debbugs.gnu.org; 22 Feb 2018 10:51:04 +0000 Received: from localhost ([127.0.0.1]:55347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eooSu-0000j2-Fm for submit@debbugs.gnu.org; Thu, 22 Feb 2018 05:51:04 -0500 Received: from mout.gmx.net ([212.227.15.18]:57873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eooSr-0000iY-Tg for 30533-done@debbugs.gnu.org; Thu, 22 Feb 2018 05:51:02 -0500 Received: from detlef.gmx.de ([213.220.147.126]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MbfnB-1f5f3a2lZV-00J0Lu; Thu, 22 Feb 2018 11:50:55 +0100 From: Michael Albinus To: Christian Johansson Subject: Re: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory References: <121b6c23-1806-2d06-17df-0ccc1cfa99c5@cvj.se> <87k1v6cvv5.fsf@gmx.de> Date: Thu, 22 Feb 2018 11:50:54 +0100 In-Reply-To: (Christian Johansson's message of "Thu, 22 Feb 2018 06:11:13 +0100") Message-ID: <87lgflfgc1.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:3NmFQSs6JQjsrkD9uCAPwXCKFhgvflUeTUMN0tnqMp9lIvdxyZI urawM3ZoMUK8dU+TcTrmLJpFqC2gAipox0CGN+KuK1VVoX5uZ4VD79pVARkHj7QxBM+ewBc BjdbX6jQanvvPbA9sxB7Wrgr3eH8qc4Jnw8lIT+JMDQExqpGXlw66icVlOjj57CJ2a7u7fB KOTN2rz3ONCdw4x5qwxpg== X-UI-Out-Filterresults: notjunk:1;V01:K0:AzUOktURNbU=:HTmzqjMZF1fnTH/kZkqEAh NnzqWK5dIxzfmCW8o61TuMLMOvP/Hg7fAB4KTGlyFzMhiNQmhT2Bz+RUMXEEXYpJ+8aMlMA4k mQ9i+wksK8SwFkJcqHre9D4VwLV1LPzqc1Hm+g6Sn23UfKLJDDiqe2awN/R5iNk8o7HqADCgu K1Gj57/WmlLGmVuNOaQ7TPxPUHmD4NqTru6rk8ElV4lFDaaRPb17bR5rnP8YRFDkIvg33cN88 KPPlAdmxFbTLhEU/dRPl9jtI8Z6B3cEsBPU7OVfBqIr2/UooEuni1U4uF/Dh1k8DOwqG3DOTI BB4DE7rbfn/iFhTFfmAZ8kSkX5M9wnbq0J+ByQn14yYk2rWWXo0bIyhKM6UZUdWvJJ6+4w7mv w4zCVUzz2A+AhPknBXN3/bj8QXmLVh985mHB7i6d7Hxi0gz0DMsO8v5GACsGKANawpjwoNDzo 0TFqslDSc8md+UHaVU6Hp37NxH19xg9IStGYFwM35T5btXByJ7+9EDRoxWFqqT4UWJ+28DYJN BBvqAhFgejroXKpgHe+uxzlSe+bPsmGY80H4hOcba1R8EsOw6LeAdWwq4krQnwfyAyg3KCqa3 6szyJiHlL3R5Oc+pDSg5ToL2DNHm7jJz95R1Slv6Kx+TBS0btq/5xMOiIDL0qmwOQRXeQWcr3 m4cbwrgjHZsuJuC891bXFgEnSBOo3tDY2xEn0axO1/euLPTy959itPFGE9WoGodOS2AE3jNGO VBhL6qioeZwc+Z8Mc2M7yOpEpaLsFfDIxHzfSIHgUuU2QahN9PNuZ2jmSDS6Ky281Fs1yTemQ dWWdCIRvM2jgZ5gRTEZaVzNQsmM361WMRDn2BBOUFgoEtOih/w= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 30533-done Cc: 30533-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Christian Johansson writes: > Hi Michael! Hi Christian, > Your fix fixed one of the issues. (file-regular-p) now works as > expected over TRAMP ftp. Thanks for the feedback. I've pushed the patch to the master branch, closing this bug. > Regards > Christian Best regards, Michael. ------------=_1519296722-2878-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Feb 2018 17:28:37 +0000 Received: from localhost ([127.0.0.1]:51542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enpEz-000511-3P for submit@debbugs.gnu.org; Mon, 19 Feb 2018 12:28:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enghS-0006IS-FF for submit@debbugs.gnu.org; Mon, 19 Feb 2018 03:21:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enghL-0007wb-KC for submit@debbugs.gnu.org; Mon, 19 Feb 2018 03:21:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1enghL-0007wV-GI for submit@debbugs.gnu.org; Mon, 19 Feb 2018 03:21:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enghJ-0004dV-1X for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 03:21:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enghE-0007vG-7s for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 03:21:16 -0500 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:34616) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1enghD-0007uu-RQ for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 03:21:12 -0500 Received: by mail-lf0-x243.google.com with SMTP id l191so11888754lfe.1 for ; Mon, 19 Feb 2018 00:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mediastrategi-se.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=FuT5OtXcwsLG/ded7kSfv8QTxjDPnOn5/XOWjlkbOeQ=; b=Coi/vc+9fKf9gfM5J821Phcr5rJImqS3wDIn2MnqhNrYF0XC9hxyUXOy+WrcN4+x9N alRCQH8OUjrVGmDxIwWdXV+GPGYKDkDiXg+TBgP1AYKkNDKKFwGP64MmtclYnRjOfJ/J dilyvqaD0j8NjjRcHPG4HBJg1+FT256Fc3IHIwWGWZVVFQ/0a/pFpQUXwpvrvYsbvl1s ONo4CvKelY8R4zPluJxRuv2/x4VPZ85ntA6E/ePeOnV0X5icpmnUtiXfoaeyJkbVPDWN 97azv2g56yAcN/3+UWsdfz9eN5cmrGwPg2KdrTD3/GW8bLx4/a6iLS54gtQoRwUXK4l8 K9qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=FuT5OtXcwsLG/ded7kSfv8QTxjDPnOn5/XOWjlkbOeQ=; b=tLDyd97JfTnbZ+ggg/3o6GrZJOrwc2pxcV0G1KISsCjx7V4pS6u8dLImVyI8CsYtM8 ooDvgazJXMZO2Mmn4Y9pmxbHn8WyG5FZswD+M0Mu78P0t/Q2NmT/BIS6eGXMPozCdQ0K LCh6JlkwRUrcn+1aBgUBjAlvzUV9APzQ9eGelcUATTK6VI2sLJV8szzuVmnZVqb0udXN o6bELhfoLMleEe29CZvn1Cz4gxKjkSwt1PjqqebjMJLCmMm8GnCUv5azcJM+GSNibC6A rSInCntpYW5vcWIKAINFEH+oou8xpHn/AzBeyw/T+7eFHyYl8R1K1WMo3Sh+40pfNTyW Vn6w== X-Gm-Message-State: APf1xPA8WqUlMMfYV8A4Dkam59KgtjSAWyMmCS0PxkfA2q90S0t4VY3Z iGxInbA7Faed26BdjpoAUrIYLZW/ X-Google-Smtp-Source: AH8x226WRAv/uGx4DDnoUcnFI++pyJIHyInDo5I6lyoWkR+05jM/22ZrIgnTOkKOh3ivjlGagvP+Bw== X-Received: by 10.46.93.148 with SMTP id v20mr8547198lje.34.1519028469552; Mon, 19 Feb 2018 00:21:09 -0800 (PST) Received: from Christians-iMac (a077.broadband2.quicknet.se. [92.43.32.77]) by smtp.gmail.com with ESMTPSA id a68sm1983105ljb.88.2018.02.19.00.21.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Feb 2018 00:21:08 -0800 (PST) From: Christian Johansson To: bug-gnu-emacs@gnu.org Subject: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Date: Mon, 19 Feb 2018 09:18:33 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 19 Feb 2018 12:28:35 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) I have a case where Emacs have trouble understanding whether a remote file is a file or a directory, I run this code where PATH-LOCAL is on localhost and PATH-REMOTE is on a remote FTP via TRAMP (let ((file-or-directory (not (file-directory-p path-remote)))) (if file-or-directory (progn (message "Downloading file '%s' to '%s'.. (synchronously)" path-r= emote path-local) (copy-file path-remote path-local t t t t) (message "Download of file '%s' finished. (synchronously)" path-l= ocal)) (progn (message "Downloading directory '%s' to '%s'.. (synchronously)" pat= h-remote path-local) (copy-directory path-remote path-local t t t) (message "Download of directory '%s' finished. (synchronously)" path-local)))) The file .error-log will be transferred locally to .error-log/.error-log instead of .error-log. The filename does not matter. It seems (file-regular-p) mistakes remote files over TRAMP FTP more often than (file-directory-p). Maybe that is the cause of this problem. In GNU Emacs 26.0.60 (build 13, x86_64-apple-darwin17.3.0, NS appkit-1561.2= 0 Version 10.13.2 (Build 17C205)) of 2018-02-19 built on Christians-iMac Repository revision: 020734c0e1a7ed8534df29992ffc4228d3663d89 Windowing system distributor 'Apple', version 10.3.1561 Recent messages: Getting /ftp:ftpuser@ftphost:/remotepath/style.css...done Getting /ftp:ftpuser@ftphost:/remotepath/travel-tips.php...done Differences calculated between directory =E2=80=99/localpath/=E2=80=99 and = =E2=80=99/ftp:ftpuser@ftphost:/remotepath/=E2=80=99 -> 0 only in A, 2 only = in B, 0 differs. (synchronously) previous-line: Beginning of buffer [6 times] Downloading file =E2=80=99/ftp:ftpuser@ftphost:/remotepath/.error-log=E2=80= =99 to =E2=80=99/localpath/.error-log=E2=80=99.. (synchronously) > ftp:ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/... > p:ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/...5k > :ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/...21k > ftpuser@ftphost:/remotepath/.error-log to /localpath/.error-log/...done Download of file =E2=80=99/localpath/.error-log=E2=80=99 finished. (synchro= nously) Quit [2 times] Configured features: JPEG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS LCMS2 Important settings: value of $LANG: sv_SE.UTF-8 locale-coding-system: utf-8-unix Major mode: Messages Minor modes in effect: show-paren-mode: t save-place-mode: t helm-mode: t helm-autoresize-mode: t global-flycheck-mode: t global-hl-todo-mode: t global-diff-hl-mode: t diff-auto-refine-mode: t global-auto-complete-mode: t dired-async-mode: t editorconfig-mode: t yas-global-mode: t yas-minor-mode: t override-global-mode: t ido-everywhere: t display-time-mode: t winner-mode: t electric-pair-mode: t desktop-save-mode: t global-semantic-mru-bookmark-mode: t global-semanticdb-minor-mode: t global-semantic-idle-completions-mode: t global-semantic-idle-scheduler-mode: t global-semantic-idle-local-symbol-highlight-mode: t global-semantic-idle-summary-mode: t global-semantic-decoration-mode: t global-semantic-highlight-func-mode: t global-semantic-stickyfunc-mode: t semantic-mode: t global-ede-mode: t delete-selection-mode: t global-whitespace-mode: t which-function-mode: t shell-dirtrack-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-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 buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy hides /Users/chris= tianjohansson/.emacs.d/elpa/ssh-deploy-20180218.704/ssh-deploy /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-diff-mode hides /U= sers/christianjohansson/.emacs.d/elpa/ssh-deploy-20180218.704/ssh-deploy-di= ff-mode /Users/christianjohansson/.emacs.d/elpa/less-css-mode-20160930.2153/less-cs= s-mode hides /Users/christianjohansson/Documents/remacs/lisp/textmodes/less= -css-mode Features: (shadow sort mail-extr ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util tramp-cache conf-mode ange-ftp tramp-ftp ede/dired helm-semantic helm-imenu vc-git emacsbug message puny rfc822 mml mml-sec epa derived epg 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 helm-command helm-elisp helm-eval edebug helm-info display-line-numbers rainbow-mode color flycheck-rust flycheck-color-mode-line face-remap auto-package-update ts-comint tss log4e json-mode json-reformat json-snatcher smartparens-javascript js smartparens-html sgml-mode dom tide tide-lv typescript-mode smarty-mode paren saveplace restclient helm-mode helm-files helm-buffers helm-tags helm-locate helm-grep helm-regexp helm-utils helm-help helm-types helm helm-source helm-multi-match helm-lib flycheck-pos-tip pos-tip flycheck subr-x hl-todo diff-hl vc-dir ewoc vc vc-dispatcher diff-mode exec-path-from-shell ssh-deploy ssh-deploy-diff-mode ac-html ac-html-core ztree ztree-diff ztree-diff-model ztree-dir ztree-view ztree-util grunt hlinum linum ac-php auto-complete-config auto-complete ac-php-core popup phpcbf php-auto-yasnippets php-mode etags xref project add-log cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs web-beautify imenu-list reveal-in-osx-finder auto-dictionary flyspell ispell dired-async dired-aux dired dired-loaddefs async editorconfig server ansible-doc ecb ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload radix-tree lisp-mnt ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper ecb-semantic ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout ecb-compilation ecb-common-browser ecb-navigate eieio-compat ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-find semantic/db-ref semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn ecb-util flymake-rust flymake-easy flymake rust-playground time-stamp cargo cargo-process smartparens-rust rust-mode compile google-translate google-translate-default-ui google-translate-core-ui google-translate-core google-translate-tk url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap json map lorem-ipsum company smartparens-config smartparens-text smartparens thingatpt paredit ansible f yasnippet yaxception ht dash know-your-http-well http-status-codes http-relations http-methods http-headers s hydra lv cl-extra help-mode use-package up-delight up-diminish up-ensure up-core pcase cl bind-key easy-mmode ido time winner edmacro kmacro elec-pair desktop frameset semantic/mru-bookmark semantic/db-mode semantic/db semantic/idle semantic/format semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom wid-edit cedet delsel disp-table whitespace which-func imenu windmove base16-dracula-theme base16-theme tramp tramp-compat tramp-loaddefs trampver shell pcomplete comint ansi-color ring parse-time format-spec advice cus-start cus-load finder-inf rx info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util 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 kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 601023 38540) (symbols 48 54999 49) (miscs 40 1120 809) (strings 32 146615 15732) (string-bytes 1 4761875) (vectors 16 82947) (vector-slots 8 1371207 5634) (floats 8 426 907) (intervals 56 1355 232) (buffers 992 24)) ------------=_1519296722-2878-1--