forked from Mirrors/flatpak-builder
parent
cd0c9da8f3
commit
9b4f14cd45
|
@ -897,6 +897,23 @@ flatpak_rm_rf (GFile *dir,
|
|||
cancellable, error);
|
||||
}
|
||||
|
||||
gboolean flatpak_file_rename (GFile *from,
|
||||
GFile *to,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
if (g_cancellable_set_error_if_cancelled (cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
if (rename (flatpak_file_get_path_cached (from),
|
||||
flatpak_file_get_path_cached (to)) < 0)
|
||||
{
|
||||
glnx_set_error_from_errno (error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define OSTREE_GIO_FAST_QUERYINFO ("standard::name,standard::type,standard::size,standard::is-symlink,standard::symlink-target," \
|
||||
"unix::device,unix::inode,unix::mode,unix::uid,unix::gid,unix::rdev")
|
||||
|
|
|
@ -221,6 +221,11 @@ GFile *flatpak_build_file_va (GFile *base,
|
|||
va_list args);
|
||||
GFile *flatpak_build_file (GFile *base, ...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
gboolean flatpak_file_rename (GFile *from,
|
||||
GFile *to,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean flatpak_openat_noatime (int dfd,
|
||||
const char *name,
|
||||
int *ret_fd,
|
||||
|
|
Loading…
Reference in New Issue