Workaround FUSE missing the generally broken Linux kernel charset support.
[captive.git] / src / client / fuse / op_opendir.c
index 53370ac..8358a2b 100644 (file)
@@ -27,6 +27,7 @@
 #include "op_opendir.h"        /* self */
 #include "main.h"
 #include "gnomevfsresult.h"
+#include "utf8.h"
 
 
 int op_opendir(const char *path,struct fuse_file_info *fi)
@@ -39,6 +40,8 @@ GnomeVFSResult errvfsresult;
        g_return_val_if_fail(sizeof(fi->fh)==sizeof(unsigned long),-EINVAL);
        g_return_val_if_fail(sizeof(fi->fh)>=sizeof(CaptiveDirectoryObject *),-EINVAL);
 
+  path=CAPFUSE_FILENAME_TO_UTF8_ALLOCA(path);
+
        if (GNOME_VFS_OK!=(errvfsresult=captive_directory_new_open(&captive_directory_object,capfuse_captive_vfs_object,path)))
                return -gnomevfsresult_to_errno(errvfsresult);