diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 620c93828da..f35c10b58ab 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1073,10 +1073,11 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." entries)) ;; Insert size information. - (insert - (if avail - (format "total used in directory %s available %s\n" used avail) - (format "total %s\n" used))) + (when full-directory-p + (insert + (if avail + (format "total used in directory %s available %s\n" used avail) + (format "total %s\n" used)))) ;; Print entries. (mapc