changeset 82064:07bb0658401d

* net/tramp.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-handle-file-attributes-with-stat) (tramp-handle-directory-files-and-attributes-with-stat( (tramp-convert-file-attributes): Handle huge file sizes.
author Michael Albinus <michael.albinus@gmx.de>
date Mon, 23 Jul 2007 20:36:23 +0000
parents 98cb9705c5b6
children e191c96a308d
files lisp/ChangeLog lisp/net/tramp.el
diffstat 2 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jul 23 20:29:55 2007 +0000
+++ b/lisp/ChangeLog	Mon Jul 23 20:36:23 2007 +0000
@@ -1,3 +1,11 @@
+2007-07-23  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-perl-file-attributes)
+	(tramp-perl-directory-files-and-attributes)
+	(tramp-handle-file-attributes-with-stat)
+	(tramp-handle-directory-files-and-attributes-with-stat(
+	(tramp-convert-file-attributes): Handle huge file sizes.
+
 2007-07-23  Juri Linkov  <juri@jurta.org>
 
 	* isearch.el (isearch-message-function): New variable.
--- a/lisp/net/tramp.el	Mon Jul 23 20:29:55 2007 +0000
+++ b/lisp/net/tramp.el	Mon Jul 23 20:36:23 2007 +0000
@@ -1528,7 +1528,7 @@
 $uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\";
 $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\";
 printf(
-    \"(%%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u %%u t (%%u . %%u) -1)\\n\",
+    \"(%%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u.0 %%u t (%%u . %%u) -1)\\n\",
     $type,
     $stat[3],
     $uid,
@@ -1577,7 +1577,7 @@
     $uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\";
     $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\";
     printf(
-        \"(\\\"%%s\\\" %%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u %%u t (%%u . %%u) (%%u %%u))\\n\",
+        \"(\\\"%%s\\\" %%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u.0 %%u t (%%u . %%u) (%%u %%u))\\n\",
         $filename,
         $type,
         $stat[3],
@@ -2390,7 +2390,7 @@
   (tramp-send-command-and-read
    vec
    (format
-    "%s -c '((\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s \"%%A\" t %%i.0 -1)' %s"
+    "%s -c '((\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)' %s"
     (tramp-get-remote-stat vec)
     (if (eq id-format 'integer) "%u" "\"%U\"")
     (if (eq id-format 'integer) "%g" "\"%G\"")
@@ -2740,7 +2740,7 @@
    (format
     (concat
      "cd %s; echo \"(\"; (%s -ab | xargs "
-     "%s -c '(\"%%n\" (\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s \"%%A\" t %%i.0 -1)'); "
+     "%s -c '(\"%%n\" (\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)'); "
      "echo \")\"")
     (tramp-shell-quote-argument localname)
     (tramp-get-ls-command vec)
@@ -6253,6 +6253,11 @@
     (setcar (nthcdr 6 attr)
 	    (list (floor (nth 6 attr) 65536)
 		  (floor (mod (nth 6 attr) 65536)))))
+  ;; Convert file size.
+  (when (< (nth 7 attr) 0)
+    (setcar (nthcdr 7 attr) -1))
+  (when (and (floatp (nth 7 attr)) (<= (nth 7 attr) most-positive-fixnum))
+    (setcar (nthcdr 7 attr) (round (nth 7 attr))))
   ;; Convert file mode bits to string.
   (unless (stringp (nth 8 attr))
     (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))))