Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarmtemp committed Jun 19, 2024
1 parent ebf76f3 commit a0f5b99
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/libostree/ostree-sysroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,16 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self, OstreeDeployment *deploym
deployment, _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_DEVELOPMENT)
: _ostree_sysroot_get_runstate_path (
deployment, _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_TRANSIENT);
g_autofree char *devpath_parent = g_path_get_dirname (devpath);

g_autofree char *devpath_parent = "";
if (dir_or_file_path[strlen (devpath) - 1] == G_DIR_SEPARATOR)
{
g_autofree char *modifed_devpath = g_strdup (devpath);
modifed_devpath[strlen (modifed_devpath) - 1] = '\0';
devpath_parent = g_path_get_dirname (modifed_dir);
}
else
devpath_parent = g_path_get_dirname (dir_or_file_path);

if (!glnx_shutil_mkdir_p_at (AT_FDCWD, devpath_parent, 0755, cancellable, error))
return FALSE;
Expand Down

0 comments on commit a0f5b99

Please sign in to comment.