Skip to content

Commit

Permalink
only delete object files of current project
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMilkies committed Mar 24, 2023
1 parent 56b9425 commit a262e6b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Class/ClassMethods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,20 @@ void Class::clean()
object_dir = global_values.object_dir;
}

if(object_files.empty())
setup_objects();
if(object_files.empty()) return; //in case there are none

string command =
#ifdef __WIN32
"del -f -q "
#else
"rm -f "
#endif // OS Check
+ object_dir + "/*" OBJ_EXTENSION;
+ all_object_files;
Util::system(command);

object_files.clear();
all_object_files.clear();
already_built = false;
}

0 comments on commit a262e6b

Please sign in to comment.