mc/mc-vfs-fish-deleted_source_file.patch
Brian White b575a4c142 Accepting request 666258 from home:adamm:branches:Base:System
- update to 4.8.22
 * Core
  - Support BTRFS's file clone operation
  - Find file: show pattern and content in the results window title
  - Find file: remember state (empty or not) of Content field
  - Improve support IBM i
  - Improve handling of hard link creation errors
  - Support user-defined prompt in the Fish subshell
 * VFS - sftp: preserve atime and mtime (#3917)
 * Editor
  - man page cleanup (#3918)
  - syntax:
        PHP - highlight keyword 'null' (#3920)
        Meson - initial implementation (#3940)
 * Misc
  - ext.d: use MPV as a fallback for mplayer -identify (#3919)
  - ext.d: improve recognition of MS Office formats (#3929)
 * Fixes
  - "Cannot create target file" when target has backslash space
    in the name (#3923)
  - Quiet single file overwrite (#3908)
  - Show error message for each not-installed program when view
    documents in MS Word and Excel formats (#3926)
  - Crash when trying some sftp connections (#3937)
  - Crash when return to filemanager from subshell (#3943)
- mc-extd-doc.patch: refreshed
- mc-extd-video.patch: refreshed
- mc-vfs-fish-deleted_source_file.patch: refreshed
- xls2csv_update.patch: refreshed

OBS-URL: https://build.opensuse.org/request/show/666258
OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=124
2019-01-16 01:08:34 +00:00

125 lines
4.9 KiB
Diff

Index: mc-4.8.22/src/filemanager/file.c
===================================================================
--- mc-4.8.22.orig/src/filemanager/file.c
+++ mc-4.8.22/src/filemanager/file.c
@@ -2662,6 +2662,8 @@ copy_file_file (file_op_total_context_t
continue;
if (temp_status == FILE_ABORT)
return_status = temp_status;
+ if (temp_status == FILE_SKIP)
+ return_status = temp_status;
if (temp_status == FILE_SKIPALL)
ctx->skip_all = TRUE;
break;
@@ -2672,6 +2674,8 @@ copy_file_file (file_op_total_context_t
temp_status = file_error (TRUE, _("Cannot close target file \"%s\"\n%s"), dst_path);
if (temp_status == FILE_RETRY)
continue;
+ if (temp_status == FILE_SKIP)
+ return_status = temp_status;
if (temp_status == FILE_SKIPALL)
ctx->skip_all = TRUE;
return_status = temp_status;
@@ -2698,10 +2702,10 @@ copy_file_file (file_op_total_context_t
if (temp_status == FILE_SKIPALL)
{
ctx->skip_all = TRUE;
- return_status = FILE_CONT;
+ return_status = FILE_SKIPALL;
}
if (temp_status == FILE_SKIP)
- return_status = FILE_CONT;
+ return_status = FILE_SKIP;
break;
}
}
@@ -2719,10 +2723,10 @@ copy_file_file (file_op_total_context_t
if (temp_status == FILE_SKIPALL)
{
ctx->skip_all = TRUE;
- return_status = FILE_CONT;
+ return_status = FILE_SKIPALL;
}
if (temp_status == FILE_SKIP)
- return_status = FILE_CONT;
+ return_status = FILE_SKIP;
break;
}
}
Index: mc-4.8.22/src/vfs/fish/fishdef.h
===================================================================
--- mc-4.8.22.orig/src/vfs/fish/fishdef.h
+++ mc-4.8.22/src/vfs/fish/fishdef.h
@@ -149,13 +149,19 @@
"FILESIZE=${FISH_FILESIZE}\n" \
"#STOR $FILESIZE $FILENAME\n" \
"echo \"### 001\"\n" \
+"touch $FILENAME 2>/dev/null\n" \
+"if [ -f $FILENAME ]; then\n" \
+"rm $FILENAME\n" \
"{\n" \
" while [ $FILESIZE -gt 0 ]; do\n" \
" cnt=`expr \\( $FILESIZE + 255 \\) / 256`\n" \
" n=`dd bs=256 count=$cnt | tee -a \"${FILENAME}\" | wc -c`\n" \
" FILESIZE=`expr $FILESIZE - $n`\n" \
" done\n" \
-"}; echo \"### 200\"\n"
+"}; echo \"### 200\"\n" \
+"else\n" \
+" echo \"### 500\"\n" \
+"fi\n"
/* default 'appe' script */
#define FISH_APPEND_DEF_CONTENT "" \
Index: mc-4.8.22/src/vfs/fish/helpers/chmod
===================================================================
--- mc-4.8.22.orig/src/vfs/fish/helpers/chmod
+++ mc-4.8.22/src/vfs/fish/helpers/chmod
@@ -1,6 +1,7 @@
#CHMOD $FISH_FILEMODE $FISH_FILENAME
-if chmod ${FISH_FILEMODE} "/${FISH_FILENAME}" 2>/dev/null; then
- echo "### 000"
-else
+chmod ${FISH_FILEMODE} "/${FISH_FILENAME}" 2>/dev/null
+if [ $? -ne 0 ]; then
echo "### 500"
+else
+ echo "### 000"
fi
Index: mc-4.8.22/src/vfs/fish/helpers/chown
===================================================================
--- mc-4.8.22.orig/src/vfs/fish/helpers/chown
+++ mc-4.8.22/src/vfs/fish/helpers/chown
@@ -1,6 +1,7 @@
#CHOWN $FISH_FILEOWNER:$FISH_FILEGROUP $FISH_FILENAME
-if chown ${FISH_FILEOWNER}:${FISH_FILEGROUP} "/${FISH_FILENAME}" ; then
- echo "### 000"
-else
+chown ${FISH_FILEOWNER}:${FISH_FILEGROUP} "/${FISH_FILENAME}"
+if [ $? -ne 0 ]; then
echo "### 500"
+else
+ echo "### 000"
fi
Index: mc-4.8.22/src/vfs/fish/helpers/send
===================================================================
--- mc-4.8.22.orig/src/vfs/fish/helpers/send
+++ mc-4.8.22/src/vfs/fish/helpers/send
@@ -1,6 +1,9 @@
#STOR $FISH_FILESIZE $FISH_FILENAME
FILENAME="/${FISH_FILENAME}"
echo "### 001"
+touch $FILENAME 2>/dev/null
+if [ -f $FILENAME ]; then
+rm $FILENAME 2>/dev/null
{
> "${FILENAME}"
bss=4096
@@ -15,3 +18,6 @@ echo "### 001"
FISH_FILESIZE=`expr $FISH_FILESIZE - $n`
done
}; echo "### 200"
+else
+ echo "### 500"
+fi