[Pkg-mc-commits] r57 - trunk/debian/patches
winnie at alioth.debian.org
winnie at alioth.debian.org
Tue Feb 26 16:04:10 UTC 2008
Author: winnie
Date: 2008-02-26 16:04:09 +0000 (Tue, 26 Feb 2008)
New Revision: 57
Modified:
trunk/debian/patches/57_dont_hang_on_errors.patch
Log:
What the heck is wrong with that patch?!?!
Modified: trunk/debian/patches/57_dont_hang_on_errors.patch
===================================================================
--- trunk/debian/patches/57_dont_hang_on_errors.patch 2008-02-26 15:50:27 UTC (rev 56)
+++ trunk/debian/patches/57_dont_hang_on_errors.patch 2008-02-26 16:04:09 UTC (rev 57)
@@ -1,63 +1,6 @@
-diff -Nurwd mc-4.6.2~pre1.orig/vfs/fish.c mc-4.6.2~pre1/vfs/fish.c
---- mc-4.6.2~pre1.orig/vfs/fish.c 2008-02-26 16:33:07.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/fish.c 2008-02-26 16:33:20.000000000 +0100
-@@ -355,6 +356,7 @@
- struct vfs_s_entry *ent = NULL;
- FILE *logfile;
- char *quoted_path;
-+ int reply_code;
-
- logfile = MEDATA->logfile;
-
-@@ -365,6 +367,8 @@
- quoted_path = name_quote (remote_path, 0);
- fish_command (me, super, NONE,
- "#LIST /%s\n"
-+ "if ls -1 /%s >/dev/null 2>&1 ;\n"
-+ "then\n"
- "ls -lLan /%s 2>/dev/null | grep '^[^cbt]' | (\n"
- "while read p l u g s m d y n; do\n"
- "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"\n"
-@@ -375,8 +379,11 @@
- "echo \"P$p $u.$g\nE$a$i\nd$m $d $y\n:$n\n\"\n"
- "done\n"
- ")\n"
-- "echo '### 200'\n",
-- remote_path, quoted_path, quoted_path);
-+ "echo '### 200'\n"
-+ "else\n"
-+ "echo '### 500'\n"
-+ "fi\n",
-+ remote_path, quoted_path, quoted_path, quoted_path);
- g_free (quoted_path);
- ent = vfs_s_generate_entry(me, NULL, dir, 0);
- while (1) {
-@@ -455,17 +462,21 @@
- }
-
- vfs_s_free_entry (me, ent);
-- me->verrno = E_REMOTE;
-- if (fish_decode_reply(buffer+4, 0) == COMPLETE) {
-+ reply_code = fish_decode_reply(buffer + 4, 0);
-+ if (reply_code == COMPLETE) {
- g_free (SUP.cwdir);
- SUP.cwdir = g_strdup (remote_path);
- print_vfs_message (_("%s: done."), me->name);
- return 0;
-+ } else if (reply_code == ERROR) {
-+ me->verrno = EACCES;
-+ } else {
-+ me->verrno = E_REMOTE;
- }
-
- error:
- print_vfs_message (_("%s: failure"), me->name);
-- return 1;
-+ return -1;
- }
-
- static int
-@@ -618,25 +629,39 @@
+--- mc-4.6.2~pre1/vfs/fish.c 2007/09/25 15:33:38 1.121
++++ mc-4.6.2~pre1/vfs/fish.c 2007/10/26 13:46:42 1.123
+@@ -619,25 +619,39 @@
g_free (name);
name = quoted_name;
fh->u.fish.append = 0;
@@ -102,26 +45,3 @@
ERRNOR (E_REMOTE, 0);
return 1;
}
-@@ -760,7 +785,7 @@
- POSTFIX(OPT_FLUSH);
- }
-
--#define FISH_OP(name, chk, string) \
-+#define FISH_OP(name, string) \
- static int fish_##name (struct vfs_class *me, const char *path1, const char *path2) \
- { \
- char buf[BUF_LARGE]; \
-@@ -786,11 +811,10 @@
- return fish_send_command(me, super2, buf, OPT_FLUSH); \
- }
-
--#define XTEST if (bucket1 != bucket2) { ERRNOR (EXDEV, -1); }
--FISH_OP(rename, XTEST, "#RENAME /%s /%s\n"
-+FISH_OP(rename, "#RENAME /%s /%s\n"
- "mv /%s /%s 2>/dev/null\n"
- "echo '### 000'" )
--FISH_OP(link, XTEST, "#LINK /%s /%s\n"
-+FISH_OP(link, "#LINK /%s /%s\n"
- "ln /%s /%s 2>/dev/null\n"
- "echo '### 000'" )
-
More information about the Pkg-mc-commits
mailing list