mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
Allow to create new files (but changing them is not allowed yet)
- since mediafire cannot deal with empty files, we put new files into a temporary location and upload them once they get closed - add create and write functions to fuse - pass a file handle to mfconn_api_upload_simple instead of a path - allow calc_sha256 to also compute the file size - error out when the key returned by upload/simple is empty - make valgrind.supp more lenient
This commit is contained in:
11
fuse/main.c
11
fuse/main.c
@@ -62,10 +62,11 @@ static struct fuse_operations mediafirefs_oper = {
|
||||
.rmdir = mediafirefs_rmdir,
|
||||
.open = mediafirefs_open,
|
||||
.read = mediafirefs_read,
|
||||
.write = mediafirefs_write,
|
||||
.release = mediafirefs_release,
|
||||
.unlink = mediafirefs_unlink,
|
||||
/* .create = mediafirefs_create,
|
||||
.fsync = mediafirefs_fsync,
|
||||
.create = mediafirefs_create,
|
||||
/* .fsync = mediafirefs_fsync,
|
||||
.getxattr = mediafirefs_getxattr,
|
||||
.init = mediafirefs_init,
|
||||
.listxattr = mediafirefs_listxattr,
|
||||
@@ -74,8 +75,7 @@ static struct fuse_operations mediafirefs_oper = {
|
||||
.setxattr = mediafirefs_setxattr,
|
||||
.statfs = mediafirefs_statfs,
|
||||
.truncate = mediafirefs_truncate,
|
||||
.utime = mediafirefs_utime,
|
||||
.write = mediafirefs_write,*/
|
||||
.utime = mediafirefs_utime,*/
|
||||
};
|
||||
|
||||
static void usage(const char *progname)
|
||||
@@ -405,6 +405,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
connect_mf(&options, ctx);
|
||||
|
||||
ctx->tmpfiles = NULL;
|
||||
ctx->num_tmpfiles = 0;
|
||||
|
||||
ret = fuse_main(argc, argv, &mediafirefs_oper, ctx);
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
|
||||
Reference in New Issue
Block a user