core: Don't use g_file_delete(), it calls into g_vfs_get_default()

For some (probably crazy) reason.  Skipping this and calling
unlink() directly makes 'strace' MUCH smaller.
This commit is contained in:
Colin Walters 2011-12-02 14:32:25 -05:00
parent 0d4df5b3fe
commit b5ce760678
3 changed files with 6 additions and 6 deletions

View File

@ -620,7 +620,7 @@ stage_and_checksum (OstreeRepo *self,
} }
out: out:
if (tmp_f) if (tmp_f)
(void) g_file_delete (tmp_f, NULL, NULL); (void) unlink (ot_gfile_get_path_cached (tmp_f));
g_clear_object (&tmp_f); g_clear_object (&tmp_f);
g_clear_object (&stream); g_clear_object (&stream);
g_clear_object (&ret_tmpname); g_clear_object (&ret_tmpname);
@ -694,7 +694,7 @@ import_gvariant_object (OstreeRepo *self,
*out_checksum = ret_checksum; *out_checksum = ret_checksum;
ret_checksum = NULL; ret_checksum = NULL;
out: out:
(void) g_file_delete (tmp_path, NULL, NULL); (void) unlink (ot_gfile_get_path_cached (tmp_path));
g_clear_object (&tmp_path); g_clear_object (&tmp_path);
ot_clear_checksum (&ret_checksum); ot_clear_checksum (&ret_checksum);
return ret; return ret;
@ -1002,7 +1002,7 @@ ostree_repo_store_file (OstreeRepo *self,
ret_checksum = NULL; ret_checksum = NULL;
out: out:
if (temp_file) if (temp_file)
(void) g_file_delete (temp_file, NULL, NULL); (void) unlink (ot_gfile_get_path_cached (temp_file));
g_clear_object (&temp_file); g_clear_object (&temp_file);
g_clear_object (&temp_out); g_clear_object (&temp_out);
g_clear_object (&input); g_clear_object (&input);
@ -1048,7 +1048,7 @@ ostree_repo_store_packfile (OstreeRepo *self,
ret = TRUE; ret = TRUE;
out: out:
if (tempfile) if (tempfile)
(void) g_file_delete (tempfile, NULL, NULL); (void) unlink (ot_gfile_get_path_cached (tempfile));
g_clear_object (&tempfile); g_clear_object (&tempfile);
g_clear_object (&src); g_clear_object (&src);
ot_clear_checksum (&checksum); ot_clear_checksum (&checksum);

View File

@ -67,7 +67,7 @@ rm_rf (GFile *path)
} }
} }
(void) g_file_delete (path, NULL, NULL); (void) unlink (ot_gfile_get_path_cached (path));
out: out:
g_clear_object (&finfo); g_clear_object (&finfo);

View File

@ -134,7 +134,7 @@ object_iter_callback (OstreeRepo *repo,
out: out:
if (dest) if (dest)
(void) g_file_delete (dest, NULL, NULL); (void) unlink (ot_gfile_get_path_cached (dest));
g_clear_object (&dest); g_clear_object (&dest);
if (error != NULL) if (error != NULL)
{ {