summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-07-25 16:29:09 +0200
committerOskar <[email protected]>2024-07-25 16:29:09 +0200
commitc93556922aa79423e580589bbef70e2573f74ea0 (patch)
tree7f97aaad850fa2bad74c508abfb7ee42ed5c4554
parentc4e9cdd7d7f9a682916723295b0153f662178c21 (diff)
fixed an option bug
-rw-r--r--TODO6
-rw-r--r--test/afkahsdlkfahlskdhflakdsjhflakdsjhflakjdshflakjdhflkadshflakjdhflakdjhflakdhfalkdsjhfalkdshfalksdjhfalkdjhfalkdsjhflakdhflakhflakjdhflkajdshflkajhglkdsjfgkjdfhlkgshfdlgksjgjhreltwlkrhtlwkejrhtwlktwerlktowieroytwierytowieyrotiweroyituweoriwreut0
-rw-r--r--trashsys.c5
3 files changed, 8 insertions, 3 deletions
diff --git a/TODO b/TODO
index cd214b6..68d259e 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
-1. Perform tests and fixed on file restoration
-2. Perform tests on commandline options
-3. Implement inconsistency check (-i)
+1. Fix commandline options
+2. Implement inconsistency check (-i)
+3.
4.
5. Clean up some code, remove redundancy and make everything a little smarter where i can
6.
diff --git a/test/afkahsdlkfahlskdhflakdsjhflakdsjhflakjdshflakjdhflkadshflakjdhflakdjhflakdhfalkdsjhfalkdshfalksdjhfalkdjhfalkdsjhflakdhflakhflakjdhflkajdshflkajhglkdsjfgkjdfhlkgshfdlgksjgjhreltwlkrhtlwkejrhtwlktwerlktowieroytwierytowieyrotiweroyituweoriwreut b/test/afkahsdlkfahlskdhflakdsjhflakdsjhflakjdshflakjdhflkadshflakjdhflakdjhflakdhfalkdsjhfalkdshfalksdjhfalkdjhfalkdsjhflakdhflakhflakjdhflkajdshflkajhglkdsjfgkjdfhlkgshfdlgksjgjhreltwlkrhtlwkejrhtwlktwerlktowieroytwierytowieyrotiweroyituweoriwreut
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/afkahsdlkfahlskdhflakdsjhflakdsjhflakjdshflakjdhflkadshflakjdhflakdjhflakdhfalkdsjhfalkdshfalksdjhfalkdjhfalkdsjhflakdhflakhflakjdhflkajdshflkajhglkdsjfgkjdfhlkgshfdlgksjgjhreltwlkrhtlwkejrhtwlktwerlktowieroytwierytowieyrotiweroyituweoriwreut
diff --git a/trashsys.c b/trashsys.c
index d7cbfa9..00a72cd 100644
--- a/trashsys.c
+++ b/trashsys.c
@@ -49,6 +49,7 @@
bool v_cvm_fprintf = false;
int choice_mode = MODE_NORMAL;
char *g_argv = NULL;
+int g_loading = true;
struct trashsys_log_info {
int64_t ts_log_id;
@@ -1160,6 +1161,10 @@ int main (int argc, char *argv[]) {
}
if(R_used == true) {
+ if(optind != argc) {
+ USAGE_OUT(stderr);
+ return EXIT_FAILURE;
+ }
if(restore_file(optarg_converted, &ipi_m) == FUNCTION_FAILURE) {
return EXIT_FAILURE;
}