diff options
author | jstebbins <[email protected]> | 2008-07-25 17:08:46 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-07-25 17:08:46 +0000 |
commit | b263182274a17eac13ca13a06e58492b99dce717 (patch) | |
tree | d6ea9dbbb4177a8ad728be9ffa94e12b2f14b0b8 /gtk/src/hb-backend.c | |
parent | d39c867a4e26e3d4eba715afc40cbc68023389ba (diff) |
LinGui: Clean up temp files between scans instead of all at once when exiting.
There was too much of a lag when doing them all at once.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1577 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r-- | gtk/src/hb-backend.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index f877b984f..cd5497aef 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -409,7 +409,7 @@ static const iso639_lang_t language_table[] = #define LANG_TABLE_SIZE (sizeof(language_table)/ sizeof(iso639_lang_t)) static void -del_tree(const gchar *name) +del_tree(const gchar *name, gboolean del_top) { const gchar *file; @@ -421,11 +421,12 @@ del_tree(const gchar *name) { gchar *path; path = g_strdup_printf("%s/%s", name, file); - del_tree(path); + del_tree(path, TRUE); g_free(path); file = g_dir_read_name(gdir); } - g_rmdir(name); + if (del_top) + g_rmdir(name); } else { @@ -521,12 +522,12 @@ static hb_handle_t * h = NULL; extern void hb_get_tempory_directory(hb_handle_t *h, char path[512]); void -ghb_hb_cleanup() +ghb_hb_cleanup(gboolean partial) { char dir[512]; hb_get_tempory_directory(h, dir); - del_tree(dir); + del_tree(dir, !partial); } static hb_audio_config_t* |