Commit Graph

171 Commits

Author SHA1 Message Date
josch
fe17cb517f check whether a connection exists before executing certain commands 2014-10-25 11:34:34 +02:00
josch
5e24f47c10 add more curl error output 2014-10-25 11:33:55 +02:00
josch
fbad17827e fuse: allow to parse config file 2014-10-20 10:31:22 +02:00
josch
5a673abd1b fix valgrind problems 2014-10-19 08:58:56 +02:00
josch
f23250aaef Allow to work with only partially filled tree
- avoid walking the whole tree on startup
 - introduce variable to keep track of which entries need updating
2014-10-19 08:43:57 +02:00
josch
8f728cf106 remove unused variables 2014-10-02 08:22:43 +02:00
josch
5fa32f8878 build with std=c99 2014-10-02 08:20:08 +02:00
josch
5bcd7c38e7 we don't need the recurse argument if we fetch the content if the folder did not exist before 2014-09-29 17:03:26 +02:00
josch
b0410cc1ac make synchronization with remote more robust 2014-09-29 16:49:11 +02:00
josch
d65f60ec81 rely on some properties of fuse to avoid checks and sanitizing 2014-09-29 10:53:34 +02:00
josch
fc520c6f5b Implement mkdir and rmdir 2014-09-28 09:37:24 +02:00
josch
43c0b09f70 hashtbl: do not expose h_entry at all 2014-09-28 07:39:13 +02:00
josch
690091721a Call folder/get_contents for updated folders in device/get_changes
- it is not enough to rely on the parent information of updated files
   because that misses files and folders that were completely removed
   (even from trash)
2014-09-27 23:06:09 +02:00
josch
53981a2229 allow persistent storage and loading of the remote tree 2014-09-27 20:20:24 +02:00
josch
b6f35763fa Optimize device/get_changes updates
- don't use folder/get_content but rely on parent information
 - add many more debugging information and sanity checks
 - ignore trash
 - correctly update local device revision using device_response
 - remove "visited" member and change housekeeping function to check for
   consistency of parents and children (and retrieve fix from remote if
   necessary)
 - print key and parent key in the debugging function
 - check for remote updates on every fs function
 - introduce global defines for key and filename length
 - add parent member, getters and setters to file.h
2014-09-27 14:05:11 +02:00
josch
da914e67b1 connect getattr and readdir to hashtbl 2014-09-26 16:10:31 +02:00
josch
b4045f19ce Add hashtable implementation to maintain a local copy of the remote 2014-09-26 15:19:55 +02:00
josch
8ac6e70609 Don't let api_device_getchanges print but let it fill datastructures 2014-09-25 21:51:42 +02:00
josch
ebc70ee4c4 fix includes 2014-09-25 19:43:38 +02:00
josch
dcce69e66d limit line length to 79 characters 2014-09-25 19:38:48 +02:00
josch
32fcb30572 fix indentation 2014-09-25 19:34:03 +02:00
josch
fd13d973ba fix memory leak in list command 2014-09-25 19:32:28 +02:00
josch
0fab559a86 Don't let api_folder_get_content print but let it fill datastructures 2014-09-25 19:27:49 +02:00
josch
44ba88a69d make valgrind return non-zero exit on failure 2014-09-25 19:25:57 +02:00
josch
975e75cc6f mfshell: add changes command, mfapi: add device/get_changes 2014-09-25 13:04:40 +02:00
josch
2e28ae16e2 remove some useless includes 2014-09-24 21:28:22 +02:00
josch
dacb6937f1 remove unused variable 2014-09-24 21:22:04 +02:00
josch
c763863d27 remove epoch 2014-09-24 21:20:21 +02:00
josch
095a05ec3c check strftime return value 2014-09-24 21:16:41 +02:00
josch
a63ee3f84e mfapi/folder.c: remove unnecessary struct members 2014-09-24 21:11:50 +02:00
josch
063db92a97 temporary workaround for ubuntu: link with --no-as-needed 2014-09-24 21:07:07 +02:00
josch
29a343267d mfshell: add the status command and the device/get_status api call 2014-09-24 18:33:04 +02:00
josch
6ca27f0a6a fix indent test and indentation 2014-09-24 11:28:35 +02:00
josch
0561a922c5 mfshell: add new folder command 2014-09-24 10:48:54 +02:00
josch
18db8742dd remove "myfiles" as a moniker for the root. Use NULL or empty string instead 2014-09-24 09:34:56 +02:00
josch
00ff91c15a fuse: add more options and establish connection on startup 2014-09-23 20:53:29 +02:00
josch
6e546fa3f3 some stderr output on error 2014-09-23 20:52:30 +02:00
josch
7e4717c18f mfconn_create: abort early on faulty input 2014-09-23 19:30:50 +02:00
josch
ab728c93da make App ID and API Key configurable via commandline 2014-09-23 19:18:23 +02:00
josch
036954df35 allow to pass no api_key when constructing the signature 2014-09-23 18:53:16 +02:00
josch
60e0824f68 mfapi/apicalls/user_session.c: don't use hardcoded application_id 2014-09-23 18:24:09 +02:00
josch
8e1fd0e41d add skeleton for fuse module 2014-09-23 15:12:19 +02:00
josch
f85072e465 refactor option and config handling 2014-09-23 14:02:30 +02:00
josch
cf410aa820 utils/http.h: fix whitespace typo 2014-09-23 13:31:47 +02:00
josch
eb9dde4457 add .gitignore to not accidentally add .mediafire-tools.conf 2014-09-23 11:39:26 +02:00
josch
e14d91ca1d mfshell: add configuration file parsing 2014-09-23 11:38:10 +02:00
josch
8f726ab5e5 allow to pass username and password by commandline arguments 2014-09-23 09:29:04 +02:00
josch
08c067a352 add const qualifiers to some variables 2014-09-23 09:28:58 +02:00
josch
675679acf7 fix segmentation fault when quitting without logging in 2014-09-23 09:28:30 +02:00
josch
164de0782f allow in-tree builds (rename mfshell executable) 2014-09-23 09:28:30 +02:00