diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-02-19 10:51:37 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-02-19 10:51:37 +0100 |
commit | c3dd820adff53837967e62497fa903bc9ff6b167 (patch) | |
tree | 4ac6f6fb0a006df72b1cf598682976802420dc8e /utils.h | |
parent | 57f9d6c29416b7252085ddf41644b65f783e82f7 (diff) | |
download | bubblewrap-c3dd820adff53837967e62497fa903bc9ff6b167.tar.gz |
When creating file bind mount destinations, check if they already exist
If they already exist as a regular file then we don't need to create
it, which is good because doing so would break if the filesystem
is readonly. I.e. that returns EROFS instead of EEXISTS in that case.
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -89,6 +89,8 @@ int copy_file (const char *src_path, int create_file (const char *path, mode_t mode, const char *content); +int ensure_file (const char *path, + mode_t mode); int get_file_mode (const char *pathname); int mkdir_with_parents (const char *pathname, int mode, |