-
-
Save dimaryaz/275f2dacc7ac50cebd33fc0217b5c249 to your computer and use it in GitHub Desktop.
/* | |
* dropbox_ext4.c | |
* | |
* Compile like this: | |
* gcc -shared -fPIC -ldl -o libdropbox_ext4.so dropbox_ext4.c | |
* | |
* Run Dropbox like this: | |
* LD_PRELOAD=./libdropbox_ext4.so ~/.dropbox-dist/dropboxd | |
*/ | |
#define _GNU_SOURCE | |
#include <stdlib.h> | |
#include <sys/vfs.h> | |
#include <linux/magic.h> | |
#include <dlfcn.h> | |
int (*orig_statfs)(const char *path, struct statfs64 *buf) = NULL; | |
int statfs64(const char *path, struct statfs64 *buf) { | |
if (orig_statfs == NULL) { | |
orig_statfs = dlsym(RTLD_NEXT, "statfs64"); | |
} | |
int retval = orig_statfs(path, buf); | |
if (retval == 0) { | |
buf->f_type = EXT4_SUPER_MAGIC; | |
} | |
return retval; | |
} |
+1 to sanmai's suggestion!
Here you go: https://github.com/dimaryaz/dropbox_ext4
I borrowed this code to create a slightly different startup script: https://github.com/dark/dropbox-filesystem-fix
I prefer dark's approach because I don't have Dropbox installed system wide. It's only on the ~/.dropbox-dist folder. So I'm using the code from his repository. I already had a symlink on my ~/bin pointing to ~/.dropbox-dist/dropboxd. That was what I used to launch dropbox, so now I just point to my local copy of dropbox_start.py and voilá... No more unsupported filesystem warning.
This doesn't work for me. I'm going to uninstall Dropbox instead.
@sanmai you can fork gists and add multiple files to it...
@dimaryaz Have you figured out a way how to do that with newer clients?
Traceback (most recent call last):
File "dropbox/client/main.pyc", line 831, in wrapper
File "dropbox/client/main.pyc", line 7009, in finish_dropbox_boot
File "dropbox/client/main.pyc", line 6446, in _init_components_for_account
File "dropbox/client/main.pyc", line 6397, in create_sync_engine
File "dropbox/sync_engine_boundary/factory.pyc", line 348, in make_sync_engine
File "dropbox/sync_engine/nucleus/classic_client/sync_engine.pyc", line 379, in __init__
File "dropbox/sync_engine/nucleus/classic_client/thin_adapter/in_proc.pyc", line 251, in __init__
File "dropbox/sync_engine/nucleus/classic_client/thin_adapter/in_proc.pyc", line 601, in _init_new_engine_locked
File "dropbox/sync_engine/nucleus/thin_client/client.pyc", line 144, in __init__
File "extensions/nucleus/nucleus_python.pyx", line 84, in nucleus_python.NucleusSyncEngine.__cinit__
nucleus_python.SyncEngineError: Initializing engine |>> Initializing platform |>> Checking if filesystem is supported |>> Filesystem is not supported: "FUSE"
Could this be made a proper repository? So there could be a Makefile, README, and a proper release. Thank you.