MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / del_tree

Function del_tree

gtk/src/hb-backend.c:1032–1057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030}
1031
1032static void
1033del_tree(const gchar *name, gboolean del_top)
1034{
1035 const gchar *file;
1036
1037 if (g_file_test(name, G_FILE_TEST_IS_DIR))
1038 {
1039 GDir *gdir = g_dir_open(name, 0, NULL);
1040 file = g_dir_read_name(gdir);
1041 while (file)
1042 {
1043 gchar *path;
1044 path = g_strdup_printf("%s/%s", name, file);
1045 del_tree(path, TRUE);
1046 g_free(path);
1047 file = g_dir_read_name(gdir);
1048 }
1049 if (del_top)
1050 g_rmdir(name);
1051 g_dir_close(gdir);
1052 }
1053 else
1054 {
1055 g_unlink(name);
1056 }
1057}
1058
1059const gchar*
1060ghb_version (void)

Callers 1

ghb_hb_cleanupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected