summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-03-05 21:04:20 +0100
committerZenWalker <[email protected]>2017-03-05 21:04:20 +0100
commitbd04285226abf4abb613cb88aad854e53e87fcbb (patch)
treec3d108d548a213bc32bbc8cc1fb714938a223c9e /src
parent55f055142fdd90a09b80ee4c5c219c108566d7a0 (diff)
downloadengrampa-bd04285226abf4abb613cb88aad854e53e87fcbb.tar.bz2
engrampa-bd04285226abf4abb613cb88aad854e53e87fcbb.tar.xz
Fix: compress rar split into volumes
Fixes #127
Diffstat (limited to 'src')
-rw-r--r--src/fr-process.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/fr-process.c b/src/fr-process.c
index a2d8898..7a65493 100644
--- a/src/fr-process.c
+++ b/src/fr-process.c
@@ -689,10 +689,20 @@ start_current_command (FrProcess *process)
if (g_str_has_prefix(commandline, "mv")) {
- if ((i==3) && (!g_file_test(g_shell_quote(argv[2]), G_FILE_TEST_EXISTS)) && (!fixname)) {
+ if ((i==3) && (!g_file_test(argv[2], G_FILE_TEST_EXISTS)) && (!fixname)) {
+ char rarfile[strlen(argv[2])+7];
- if ((g_str_has_suffix(argv[2], ".7z")) && (!g_str_has_suffix(argv[2], ".tar.7z"))) {
- commandline = g_strconcat(commandline, " ", g_shell_quote(argv[2]), "*", NULL);
+ strcpy(rarfile, argv[2]);
+ rarfile[strlen(rarfile)-3]=0;
+ strcat(rarfile, "part1.rar");
+
+ if (g_str_has_suffix(argv[2], ".7z")) {
+ commandline = g_strconcat(commandline, " ", g_shell_quote(argv[2]), ".*", NULL);
+ fixname = TRUE;
+ }
+ else if (g_str_has_suffix(argv[2], ".rar")) {
+ rarfile[strlen(rarfile)-5]=0;
+ commandline = g_strconcat(commandline, " ", g_shell_quote(rarfile), "*.rar", NULL);
fixname = TRUE;
}
}