]> code.delx.au - gnu-emacs/blobdiff - lisp/net/tramp-compat.el
Make all Tramp tests pass for "gdrive" method
[gnu-emacs] / lisp / net / tramp-compat.el
index 0e9fcb501a79e2cb0481d140f3f0cb8268e398a8..c84fb5ac42823675d6ef3344f08e21869b935863 100644 (file)
@@ -174,8 +174,7 @@ Add the extension of F, if existing."
                (tramp-compat-copy-directory file newname keep-time parents)
              (copy-file file newname t keep-time)))
          ;; We do not want to delete "." and "..".
-         (directory-files
-          directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))
+         (directory-files directory 'full directory-files-no-dot-files-regexp))
 
         ;; Set directory attributes.
         (set-file-modes newname (file-modes directory))
@@ -209,13 +208,13 @@ Add the extension of F, if existing."
     ;; implementation from Emacs 23.2.
     (wrong-number-of-arguments
      (setq directory (directory-file-name (expand-file-name directory)))
-     (if (not (file-symlink-p directory))
-        (mapc (lambda (file)
-                (if (eq t (car (file-attributes file)))
-                    (tramp-compat-delete-directory file recursive trash)
-                  (tramp-compat-delete-file file trash)))
-              (directory-files
-               directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
+     (when (not (file-symlink-p directory))
+       (mapc (lambda (file)
+              (if (eq t (car (file-attributes file)))
+                  (tramp-compat-delete-directory file recursive trash)
+                (tramp-compat-delete-file file trash)))
+            (directory-files
+             directory 'full directory-files-no-dot-files-regexp)))
      (delete-directory directory))))
 
 (defun tramp-compat-process-running-p (process-name)