Force 'captivemodid' checking during any W32 module loading.
[captive.git] / src / client / fuse / main.c
index 0935914..b805c71 100644 (file)
@@ -29,6 +29,7 @@
 #include <captive/client-vfs.h>
 #include <captive/macros.h>
 #include <captive/client.h>
+#include <captive/captivemodid.h>
 
 #include "main.h"      /* self */
 #include "op_statfs.h"
@@ -175,8 +176,6 @@ const char *image_filename;
        for (csp=rest_argv,rest_argc=0;csp && *csp;csp++)
                rest_argc++;
 
-       captive_options=NULL;   /* already parsed by 'CAPTIVE_POPT_INCLUDE' */
-
        /* Override the (default) Captive options with mount(8) supplied "-o" argument. */
        /* rest_argv[0] is the device now. */
        /* rest_argv[1] is the mountpoint now. */
@@ -211,6 +210,9 @@ const char *cs=rest_argv[3];
                g_error(_("image_iochannel failed open of: %s"),image_filename);
                return EXIT_FAILURE;
                }
+       
+       if (!options.captivemodid)
+               options.captivemodid=captive_captivemodid_load_default(FALSE);
 
        if (options.filesystem.type==CAPTIVE_OPTIONS_MODULE_TYPE_EMPTY) {
 const char *self_prefix="mount.captive-";
@@ -239,6 +241,9 @@ struct captive_options_module *options_module;
                options.load_module=g_list_append(options.load_module,options_module);
                }
 
+       /* It is still required for: captive_options_module_load() */
+       captive_options=NULL;   /* already parsed by 'CAPTIVE_POPT_INCLUDE' */
+
        if (GNOME_VFS_OK!=captive_vfs_new(&capfuse_captive_vfs_object,&options)) {
                g_error(_("captive_vfs_new() failed"));
                return EXIT_FAILURE;