mirror of
https://github.com/vgough/encfs.git
synced 2025-03-12 13:18:36 +01:00
add encfs_create, fixes #162
This commit is contained in:
parent
05a749d32f
commit
aacce54f42
@ -533,6 +533,15 @@ int encfs_open(const char *path, struct fuse_file_info *file) {
|
||||
return res;
|
||||
}
|
||||
|
||||
int encfs_create(const char *path, mode_t mode, struct fuse_file_info *file) {
|
||||
int res = encfs_mknod(path, mode, 0);
|
||||
if (res) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return encfs_open(path, file);
|
||||
}
|
||||
|
||||
int _do_flush(FileNode *fnode) {
|
||||
/* Flush can be called multiple times for an open file, so it doesn't
|
||||
close the file. However it is important to call close() for some
|
||||
|
@ -76,6 +76,7 @@ int encfs_truncate(const char *path, off_t size);
|
||||
int encfs_ftruncate(const char *path, off_t size, struct fuse_file_info *fi);
|
||||
int encfs_utime(const char *path, struct utimbuf *buf);
|
||||
int encfs_open(const char *path, struct fuse_file_info *info);
|
||||
int encfs_create(const char *path, mode_t mode, struct fuse_file_info *info);
|
||||
int encfs_release(const char *path, struct fuse_file_info *info);
|
||||
int encfs_read(const char *path, char *buf, size_t size, off_t offset,
|
||||
struct fuse_file_info *info);
|
||||
|
@ -605,7 +605,7 @@ int main(int argc, char *argv[]) {
|
||||
encfs_oper.init = encfs_init;
|
||||
encfs_oper.destroy = encfs_destroy;
|
||||
// encfs_oper.access = encfs_access;
|
||||
// encfs_oper.create = encfs_create;
|
||||
encfs_oper.create = encfs_create;
|
||||
encfs_oper.ftruncate = encfs_ftruncate;
|
||||
encfs_oper.fgetattr = encfs_fgetattr;
|
||||
// encfs_oper.lock = encfs_lock;
|
||||
|
Loading…
Reference in New Issue
Block a user