diff options
author | Oskar <[email protected]> | 2024-06-30 13:49:43 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-06-30 13:49:43 +0200 |
commit | b5fc1ae8a6c5d06b76c94da22495fccd2e126bb3 (patch) | |
tree | 0c261ada5017004cdbde2cc734daf3e050a97ae6 | |
parent | 2d664cc4e151f03053982d3075239bfa1aaea41e (diff) |
new tmp strings for ipi
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | trashsys.c | 9 |
2 files changed, 11 insertions, 2 deletions
@@ -1,5 +1,5 @@ -1. Handle case where there is no file and it makes an ID of 2 -2. Add ID to the trashed files as well because duplicate names happen. Also add entry to logfile where the trashed file's id is included in the filename +1. +2. 3. Implement function to read log files? And maybe act upon the read contents? I'll have to think more about this. 4. 5. Clean up some code, remove redundancy and make everything a little smarter where i can @@ -122,6 +122,15 @@ struct initial_path_info *fill_ipi() { // Function for filling out initial_path_ char *ts_log_withslash = "/log/"; char *ts_trashed_withslash = "/trashed/"; char *homepath; + + char *ts_tmp = "/tmp"; + char *ts_tmp_toplevel = "/tmp/.trashsys"; + char *ts_tmp_log = "/tmp/.trashsys/log"; + char *ts_tmp_trashed = "/tmp/.trashsys/trashed"; + char *ts_tmp_withslash = "/tmp/"; + char *ts_tmp_toplevel_withslash = "/tmp/.trashsys/"; + char *ts_tmp_log = "/tmp/.trashsys/log/"; + char *ts_tmp_trashed = "/tmp/.trashsys/trashed/" struct initial_path_info *ipi = malloc(sizeof(struct initial_path_info)); // malloc memory to struct ipi->ts_path_user_home[0] = '\0'; // Add null character to all of them because we'll be using concat_str (basically strcat) later |