Tags: patch
Hi,
Am Dienstag, den 24.01.2006, 18:36 +0100 schrieb Ludovic Drolez:
> Ok, mc uses 'cat /file' on the remote host for downloading. So
> if the remote system does not support large files, it won't work.
I had a look at the source code of mc and it is obviously a bug in the
fish vfs extension. The patch attached to this mail changes the
variables holding the size of the file copied from int to off_t. With
this patch copying files greater than 2GB is now working for me.
Regards,
Thomas
--
Thomas Liske Technische Universität Dresden
E-Mail: [EMAIL PROTECTED] Fachschaftsrat Elektrotechnik
WWW: http://www.fsr.et.tu-dresden.de/ Helmholtzstr. 18, Zi. BAR/165
Tel.: +49 351 463-35193 01062 Dresden
GnuPG: 0x49D0C2C3 BABD AE55 3D90 7E30 6A9E BF7E 8C2B 0B26 49D0 C2C3
diff -ur mc-4.6.0-4.6.1-pre3.orig/vfs/fish.c mc-4.6.0-4.6.1-pre3/vfs/fish.c
--- mc-4.6.0-4.6.1-pre3.orig/vfs/fish.c 2004-12-28 13:24:09.000000000 +0100
+++ mc-4.6.0-4.6.1-pre3/vfs/fish.c 2006-01-27 16:31:19.000000000 +0100
@@ -604,7 +604,7 @@
if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
fh->linear = LS_LINEAR_OPEN;
fh->u.fish.got = 0;
- if (sscanf( reply_str, "%d", &fh->u.fish.total )!=1)
+ if (sscanf( reply_str, "%Lu", &fh->u.fish.total )!=1)
ERRNOR (E_REMOTE, 0);
return 1;
}
diff -ur mc-4.6.0-4.6.1-pre3.orig/vfs/xdirentry.h mc-4.6.0-4.6.1-pre3/vfs/xdirentry.h
--- mc-4.6.0-4.6.1-pre3.orig/vfs/xdirentry.h 2004-10-06 20:04:15.000000000 +0200
+++ mc-4.6.0-4.6.1-pre3/vfs/xdirentry.h 2006-01-27 16:38:36.000000000 +0100
@@ -102,7 +102,8 @@
int linear; /* Is that file open with O_LINEAR? */
union {
struct {
- int got, total, append;
+ off_t got, total;
+ int append;
} fish;
struct {
int sock, append;