From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christian Johansson Newsgroups: gmane.emacs.bugs Subject: bug#30533: 26.0.60; (copy-file) over TRAMP FTP mistakes file for directory Date: Mon, 19 Feb 2018 09:18:33 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1519061250 27710 195.159.176.226 (19 Feb 2018 17:27:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Feb 2018 17:27:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (darwin) To: 30533@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 19 18:27:26 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enpDb-00060S-25 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Feb 2018 18:27:11 +0100 Original-Received: from localhost ([::1]:51554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enpFd-00016Z-7o for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Feb 2018 12:29:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enpFT-00014u-2f for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 12:29:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enpFO-0000KD-QO for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 12:29:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1enpFO-0000K2-JB for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 12:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1enpFO-00051m-60 for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2018 12:29:02 -0500 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.151906131719287 (code B ref -1); Mon, 19 Feb 2018 17:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Feb 2018 17:28:37 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143463 Archived-At: 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))