forked from Mirrors/flatpak-builder
build-finish: Don't error out on exports
gs_shutil_cp_a dies if the target exists, so only create the parent dir before copying.tingping/wmclass
parent
bc460da1c5
commit
55a3f413c2
|
@ -65,9 +65,11 @@ collect_exports (GFile *base, GCancellable *cancellable, GError **error)
|
|||
{
|
||||
g_debug ("Exporting from %s", paths[i]);
|
||||
gs_unref_object GFile *dest = NULL;
|
||||
gs_unref_object GFile *dest_parent = NULL;
|
||||
dest = g_file_resolve_relative_path (export, paths[i]);
|
||||
g_debug ("Ensuring export/%s exists", paths[i]);
|
||||
if (!gs_file_ensure_directory (dest, TRUE, cancellable, error))
|
||||
dest_parent = g_file_get_parent (dest);
|
||||
g_debug ("Ensuring export/%s parent exists", paths[i]);
|
||||
if (!gs_file_ensure_directory (dest_parent, TRUE, cancellable, error))
|
||||
goto out;
|
||||
g_debug ("Copying from files/%s", paths[i]);
|
||||
if (!gs_shutil_cp_a (src, dest, cancellable, error))
|
||||
|
|
Loading…
Reference in New Issue