forked from Mirrors/flatpak-builder
builder: Use flatpak_mkdir_p instead of query + mkdir
parent
646f54da1b
commit
3058d413f0
|
@ -159,8 +159,7 @@ bundle_manifest (BuilderContext *build_context,
|
|||
"sources",
|
||||
NULL);
|
||||
sources_dir = g_file_new_for_path (sources_dir_path);
|
||||
if (!g_file_query_exists (sources_dir, NULL) &&
|
||||
!g_file_make_directory_with_parents (sources_dir, NULL, error))
|
||||
if (!flatpak_mkdir_p (sources_dir, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
file_name = g_file_get_basename (manifest_file);
|
||||
|
|
|
@ -623,8 +623,7 @@ builder_source_archive_bundle (BuilderSource *source,
|
|||
self->sha256,
|
||||
NULL);
|
||||
download_dir = g_file_new_for_path (download_dir_path);
|
||||
if (!g_file_query_exists (download_dir, NULL) &&
|
||||
!g_file_make_directory_with_parents (download_dir, NULL, error))
|
||||
if (!flatpak_mkdir_p (download_dir, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
file_name = g_file_get_basename (file);
|
||||
|
|
|
@ -288,8 +288,7 @@ builder_source_bzr_bundle (BuilderSource *source,
|
|||
"bzr",
|
||||
NULL);
|
||||
bzr_sources_dir = g_file_new_for_path (bzr_sources_dir_path);
|
||||
if (!g_file_query_exists (bzr_sources_dir, NULL) &&
|
||||
!g_file_make_directory_with_parents (bzr_sources_dir, NULL, error))
|
||||
if (!flatpak_mkdir_p (bzr_sources_dir, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
base_name_tmp = g_strconcat (base_name, ".clone_tmp", NULL);
|
||||
|
|
|
@ -466,8 +466,7 @@ builder_source_file_bundle (BuilderSource *source,
|
|||
self->sha256,
|
||||
NULL);
|
||||
download_dir = g_file_new_for_path (download_dir_path);
|
||||
if (!g_file_query_exists (download_dir, NULL) &&
|
||||
!g_file_make_directory_with_parents (download_dir, NULL, error))
|
||||
if (!flatpak_mkdir_p (download_dir, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
file_name = g_file_get_basename (file);
|
||||
|
|
|
@ -269,8 +269,7 @@ builder_source_git_bundle (BuilderSource *source,
|
|||
"git",
|
||||
NULL);
|
||||
mirror_dir = g_file_new_for_path (mirror_dir_path);
|
||||
if (!g_file_query_exists (mirror_dir, NULL) &&
|
||||
!g_file_make_directory_with_parents (mirror_dir, NULL, error))
|
||||
if (!flatpak_mkdir_p (mirror_dir, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
if (!builder_git_mirror_repo (location,
|
||||
|
|
|
@ -301,8 +301,7 @@ builder_source_patch_bundle (BuilderSource *source,
|
|||
"patches",
|
||||
NULL);
|
||||
patches_dir = g_file_new_for_path (patches_dir_path);
|
||||
if (!g_file_query_exists (patches_dir, NULL) &&
|
||||
!g_file_make_directory_with_parents (patches_dir, NULL, error))
|
||||
if (!flatpak_mkdir_p (patches_dir, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
file_name = g_file_get_basename (src);
|
||||
|
|
Loading…
Reference in New Issue