Workaround FUSE missing the generally broken Linux kernel charset support.
[captive.git] / src / client / fuse / op_rename.c
index eb42cf8..4c46ee7 100644 (file)
@@ -28,6 +28,7 @@
 #include "op_rename.h" /* self */
 #include "main.h"
 #include "gnomevfsresult.h"
+#include "utf8.h"
 
 
 int op_rename(const char *oldpath,const char *newpath)
@@ -38,6 +39,9 @@ GnomeVFSResult errvfsresult;
        g_return_val_if_fail(oldpath!=NULL,-EINVAL);
        g_return_val_if_fail(newpath!=NULL,-EINVAL);
 
+  oldpath=CAPFUSE_FILENAME_TO_UTF8_ALLOCA(oldpath);
+  newpath=CAPFUSE_FILENAME_TO_UTF8_ALLOCA(newpath);
+
        if (GNOME_VFS_OK!=(errvfsresult=captive_file_new_open(&captive_file_object,capfuse_captive_vfs_object,oldpath,
                        GNOME_VFS_OPEN_WRITE|GNOME_VFS_OPEN_RANDOM)))
                return -gnomevfsresult_to_errno(errvfsresult);