checkout: add an extra checkout_overwrite mode
This is for issue projectatomic/rpm-ostree#365, an extra option of overwrite mode is added to the checkout command so that when there is "non-directory" file already exist during checkout, the error will be handled. Some tests are added for regression Closes: #1116 Approved by: cgwalters
This commit is contained in:
1 parent
12114ce382
commit
f07432d4ce
6 files changed
+57
-3
No files matched your search
@@ -654,7 +654,8 @@ checkout_tree_at_recurse (OstreeRepo *self,
|
||||
{
|
||||
if (errno == EEXIST &&
|
||||
(options->overwrite_mode == OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES
|
||||
|| options->overwrite_mode == OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES))
|
||||
|| options->overwrite_mode == OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES
|
||||
|| options->overwrite_mode == OSTREE_REPO_CHECKOUT_OVERWRITE_DISJOINT_UNION_FILES))
|
||||
did_exist = TRUE;
|
||||
else
|
||||
return glnx_throw_errno (error);
|
||||
|
||||
Reference in new issue
Block a user