summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-03-05 21:04:20 +0100
committerZenWalker <[email protected]>2017-05-17 13:12:06 +0200
commit21c82365ebca884683dc924017b791743a044ef5 (patch)
tree5901c32886db0fd4679b3c45b4fe536dc1dec7d5
parentba7632c4206c2f9a2e68658496e1d3c47465ef49 (diff)
downloadengrampa-21c82365ebca884683dc924017b791743a044ef5.tar.bz2
engrampa-21c82365ebca884683dc924017b791743a044ef5.tar.xz
Fix: compress rar split into volumes
Fixes #127
-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;
}
}