Workaround FUSE missing the generally broken Linux kernel charset support.
[captive.git] / src / client / fuse / op_open.c
index 9f63503..4293bad 100644 (file)
@@ -30,6 +30,7 @@
 #include "op_open.h"   /* self */
 #include "main.h"
 #include "gnomevfsresult.h"
+#include "utf8.h"
 
 
 int op_open(const char *path,struct fuse_file_info *fi)
@@ -42,6 +43,8 @@ GnomeVFSResult errvfsresult;
        g_return_val_if_fail(sizeof(fi->fh)==sizeof(unsigned long),-EINVAL);
        g_return_val_if_fail(sizeof(fi->fh)>=sizeof(CaptiveFileObject *),-EINVAL);
 
+  path=CAPFUSE_FILENAME_TO_UTF8_ALLOCA(path);
+
        if (GNOME_VFS_OK!=(errvfsresult=captive_file_new_open(&captive_file_object,capfuse_captive_vfs_object,path,
                        GNOME_VFS_OPEN_RANDOM
                                        || (!(fi->flags&(O_RDONLY|O_RDWR))          ? 0 : GNOME_VFS_OPEN_READ)