summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakiyamn2020-09-10 19:01:48 +1000
committerakiyamn2020-09-10 19:01:48 +1000
commit9e59c22e43501007d4aa54bd93aabd914273a347 (patch)
tree16c86b0eee8a2529071eb087af79061eb1b40800
parent5d66cc376fd5c96fe4357a8f9eca3b5727a6eb9f (diff)
downloadfit2100_ass1-9e59c22e43501007d4aa54bd93aabd914273a347.tar.gz
fit2100_ass1-9e59c22e43501007d4aa54bd93aabd914273a347.zip
Added a separate move message1.0.0-rc3
-rw-r--r--fileutil.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fileutil.c b/fileutil.c
index 92eb81f..b35fd76 100644
--- a/fileutil.c
+++ b/fileutil.c
@@ -92,8 +92,12 @@ void copy_into_dir(char *file_path, char *dir_path, bool move, bool overwrite){
strcat(new_path, filename);
copy_file(file_path, new_path, overwrite);
- if (move) unlink(file_path); // Delete the original if `move` is specified
- to_stdout("Copy successful\n");
+ if (move) {
+ unlink(file_path); // Delete the original if `move` is specified
+ to_stdout("Move successful.\n");
+ } else {
+ to_stdout("Copy successful.\n");
+ }
free(new_path);
}