- handle filenames with spaces (#98655) - add requires for lrzsz - spec cleanup Resolves: #98655
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
Patch from Debian's minicom_2.2-5.diff.gz:
|
|
minicom-2.2/debian/patches/bug199924.diff
|
|
--- minicom-2.2.orig/src/util.c 2005-11-09 00:34:25.000000000 +0100
|
|
+++ minicom-2.2/src/util.c 2006-10-19 17:38:18.000000000 +0200
|
|
@@ -116,7 +116,7 @@
|
|
|
|
/* Delete escape-characters ment for the shell */
|
|
p = cmd;
|
|
- while ((p = strchr(p, '\\')))
|
|
+ while ((p = strchr(p, '\\')) && *(p+1) != ' ')
|
|
memmove(p, p + 1, strlen(p+1));
|
|
|
|
/* Split line into words */
|
|
--- minicom-2.2.orig/src/file.c 2005-08-14 22:39:30.000000000 +0200
|
|
+++ minicom-2.2/src/file.c 2006-10-19 17:43:10.000000000 +0200
|
|
@@ -529,6 +529,8 @@
|
|
{
|
|
GETSDIR_ENTRY *my_d;
|
|
int indxr, len;
|
|
+ int i;
|
|
+ char *j;
|
|
|
|
my_d = d;
|
|
for (indxr = nrents, len = 0; indxr; --indxr, ++my_d)
|
|
@@ -548,8 +550,18 @@
|
|
for (indxr = nrents; indxr; --indxr, ++my_d)
|
|
if (my_d->cflags & FL_TAG) {
|
|
/* this could be *much* more efficient */
|
|
- strcat(ret_buf, my_d->fname);
|
|
- strcat(ret_buf, " ");
|
|
+ for (i = strlen(ret_buf), j = my_d->fname; *j; j++) {
|
|
+ if (*j == ' ') {
|
|
+ if ((ret_buf = (char*)realloc(ret_buf, ++len)) == NULL) {
|
|
+ file_tell(_("Too many files tagged - buffer would overflow"));
|
|
+ return(NULL);
|
|
+ }
|
|
+ ret_buf[i++] = '\\';
|
|
+ }
|
|
+ ret_buf[i++] = *j;
|
|
+ }
|
|
+ ret_buf[i++] = ' ';
|
|
+ ret_buf[i] = '\0';
|
|
}
|
|
|
|
ret_buf[strlen(ret_buf) - 1] = (char)0;
|