diff --git a/client/file_names.C b/client/file_names.C index b11abb0eb4..fb5b35eb89 100644 --- a/client/file_names.C +++ b/client/file_names.C @@ -145,6 +145,16 @@ int make_project_dir(PROJECT& p) { return 0; } +int remove_project_dir(PROJECT& p) { + char buf[256],buf2[256]; + + escape_project_url(p.master_url, buf); + sprintf(buf2, "%s%s%s", PROJECTS_DIR, PATH_SEPARATOR, buf); + clean_out_dir(buf2); + RemoveDirectory(buf2); + return 0; +} + // Returns the location of a numbered slot directory // int make_slot_dir(int slot) { @@ -173,6 +183,16 @@ int make_project_dir(PROJECT& p) { return 0; } +int remove_project_dir(PROJECT& p) { + char buf[256],buf2[256]; + + escape_project_url(p.master_url, buf); + sprintf(buf2, "%s%s%s", PROJECTS_DIR, PATH_SEPARATOR, buf); + clean_out_dir(buf2); + rmdir(buf2); + return 0; +} + // Create the slot directory for the specified slot # // int make_slot_dir(int slot) { diff --git a/client/file_names.h b/client/file_names.h index eb89055697..3f694abb36 100644 --- a/client/file_names.h +++ b/client/file_names.h @@ -30,6 +30,7 @@ extern void get_pathname(FILE_INFO* fip, char* path); extern void get_slot_dir(int slot, char* path); extern int make_project_dir(PROJECT&); +extern int remove_project_dir(PROJECT&); extern int make_slot_dir(int); extern void get_account_filename(char* master_url, char* path); extern bool is_account_file(char*);