summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-09-03 01:24:56 +0200
committerlukefromdc <[email protected]>2019-09-08 19:47:27 +0000
commit807286f708e326a3638b664a513b884eeeee2390 (patch)
tree8cf05f316aa0c192bb7d1ebee8ed82f27a621d8d
parent4fb087c731af5282dc817bfc8350afe325eef532 (diff)
downloadengrampa-807286f708e326a3638b664a513b884eeeee2390.tar.bz2
engrampa-807286f708e326a3638b664a513b884eeeee2390.tar.xz
tar: don't remove leading whitespaces in filename field
closes #299
-rw-r--r--src/fr-command-tar.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c
index 62c77a9..439a12e 100644
--- a/src/fr-command-tar.c
+++ b/src/fr-command-tar.c
@@ -107,15 +107,15 @@ tar_get_last_field (const char *line,
while ((field_n > 0) && (*f_end != 0)) {
if (*f_end == ' ') {
field_n--;
- if (field_n != 0) {
- while ((*f_end == ' ') && (*f_end != *line))
- f_end++;
+ if (field_n == 1)
f_start = f_end;
- }
- } else
- f_end++;
+ }
+ f_end++;
}
+ if (*f_start == ' ')
+ f_start++;
+
return g_strdup (f_start);
}