Commit Graph

28 Commits

Author SHA1 Message Date
Michael Wehr
2532fc3ca3 switch to fork/exec/dup2 instead of popen
To get rid of the problems from having to escape certain special chars
when using popen to call the find and du system commands, on suggestion
of N-R-K this switches popen with a fork/exec/dup2 based approach.
See https://github.com/jarun/advcpmv/pull/14#issuecomment-1035880454 and
https://github.com/jarun/advcpmv/pull/14#issuecomment-1035892465.
2022-02-13 15:50:06 +01:00
Michael Wehr
8a8af288bb fix output of ftime instead of ttime 2022-01-11 23:28:10 +01:00
Michael Wehr
30b6aff569 refactor format_time function and calls to fix memory leak 2022-01-11 22:11:46 +01:00
Michael Wehr
1e12a7c529 add remaining time for file 2022-01-11 20:54:12 +01:00
Michael Wehr
53a449f84c move total remaining time to global bar and fix format_time 2022-01-10 23:39:30 +01:00
Michael Wehr
b79170e69b show total number of files to copy 2022-01-09 21:18:46 +01:00
Michael Wehr
ae89bfdb24 use function to also calculate and format elapsed time 2022-01-09 21:15:26 +01:00
Michael Wehr
d8013b9f35 add missed comments to identify all progress mod changes 2022-01-04 21:58:45 +01:00
Michael Wehr
2f468f6896 show elapsed time in good-bye message as xh xm xs instead seconds only 2022-01-04 21:11:43 +01:00
Michael Wehr
cf51b9bd8b switch back to using calloc instead of malloc
using malloc generated errors when memory leak checking with valgrind
because malloc creates uninitialized space
2021-12-25 11:16:03 +01:00
Michael Wehr
c8149fab75 show global progress bar in some cases where not shown before
when using wildcards:
cp -r -g ./src/normal/* ./sinkhole/
when giving multiple source files:
cp -r -g ./src/normal/{testfile0,testfile2}
or
cp -g -t ../../sinkhole/ testfile0 testfile2
2021-12-25 11:05:23 +01:00
Michael Wehr
a620f86965 escape grave accents, they break the double quoted system commands 2021-12-24 20:11:32 +01:00
Michael Wehr
3ac56d553f show global progressbar when moving files in copy mode (between devices) 2021-12-23 19:21:33 +01:00
Michael Wehr
e529e310ea fix casing of output, to better match unmodded messages 2021-12-23 18:55:23 +01:00
Michael Wehr
a1cc785674 add more comments to identify all progress mod changes 2021-12-23 12:00:26 +01:00
Michael Wehr
aa4d645a11 move comment to enclose progess struct 2021-12-23 09:07:53 +01:00
Michael Wehr
24ad5c292c when moving display one good-bye message and show what was moved 2021-12-22 23:43:26 +01:00
Michael Wehr
edec49ec6f escape double quotes, so system commands don't break anymore 2021-12-22 21:16:20 +01:00
Michael Wehr
7e2df2e0b7 harmonize string handling, so only double quotes break system commands 2021-12-22 14:19:51 +01:00
Michael Wehr
c9d7d6779f change comment positioning 2021-12-22 14:09:12 +01:00
Michael Wehr
3b2fdc6f42 fix comment casing 2021-12-22 13:57:59 +01:00
Michael Wehr
d337f35f5b fix whitespace 2021-12-22 13:48:56 +01:00
Michael Wehr
9d614d1883 fix compiler warning for 0.9 patch 2021-12-22 11:57:51 +01:00
Aaron
3ef18c8f20 Fix compiler warnings
Signed-off-by: Aaron <admin@datahoarder.dev>
2021-11-12 09:53:29 +01:00
Zackptg5
39c571c505 old bug fix, add readme note 2021-11-11 21:55:13 -05:00
Zackptg5
fd0fc50b1a Add 9.0 patch
Doesn't work with reflink, disable if using  progress-bar
2021-11-09 12:42:26 -05:00
Arun
7948d430cb Revert "Add 9.0 patch" 2021-11-06 07:04:44 +05:30
Zackptg5
d1c5b22cf0 Add 9.0 patch 2021-10-28 15:16:31 -04:00