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:
@@ -31,6 +31,12 @@ struct mediafirefs_context_private {
|
||||
char *configfile;
|
||||
char *dircache;
|
||||
char *filecache;
|
||||
/* stores all currently open temporary files which are to be uploaded when
|
||||
* they are closed.
|
||||
* we use a normal array because the number of open temporary files will
|
||||
* never be very high but is limited by the number of threads */
|
||||
char **tmpfiles;
|
||||
size_t num_tmpfiles;
|
||||
};
|
||||
|
||||
int mediafirefs_getattr(const char *path, struct stat *stbuf);
|
||||
@@ -46,7 +52,12 @@ int mediafirefs_open(const char *path,
|
||||
int mediafirefs_read(const char *path, char *buf, size_t size,
|
||||
off_t offset,
|
||||
struct fuse_file_info *file_info);
|
||||
int mediafirefs_write(const char *path, const char *buf,
|
||||
size_t size, off_t offset,
|
||||
struct fuse_file_info *file_info);
|
||||
int mediafirefs_release(const char *path,
|
||||
struct fuse_file_info *file_info);
|
||||
int mediafirefs_create(const char *path, mode_t mode,
|
||||
struct fuse_file_info *file_info);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user