Cannot run file.mount_enclosing_volume with arguments

Hello,

Whenever I run something like

file.mount_enclosing_volume 0, mop

I get

Exception `TypeError’ at gfselect.rb:53 - GMountMountFlags is not a
GFlags

passing in the GLib ‘NONE’ constant does not make any difference.

Any solution?

ii gvfs-bin 1.8.2-1smbdom1 userspace
virtual filesystem - binaries
gio2 (1.0.0)

Thanks

Michal

$ irb
irb(main):001:0> remote = GLib::File.new_for_commandline_arg
“smb://server/share”
=> #<#Class:0x7fd2d20abea8:0x7fd2d20abca0 ptr=0x11e2e70>
irb(main):002:0> remote.mount_enclosing_volume
=> #<#Class:0x7fd2d20abea8:0x7fd2d20abca0 ptr=0x11e2e70>
irb(main):003:0> remote.mount_enclosing_volume
=> #<#Class:0x7fd2d20abea8:0x7fd2d20abca0 ptr=0x11e2e70>
irb(main):004:0> remote.mount_enclosing_volume 0
TypeError: GMountMountFlags is not a GFlags
from (irb):4:in mount_enclosing_volume' from (irb):4 irb(main):005:0> remote.mount_enclosing_volume GLib::Mount::MOUNT_NONE TypeError: GMountMountFlags is not a GFlags from (irb):5:inmount_enclosing_volume’
from (irb):5

On Fri, Sep 9, 2011 at 16:45, Michal S. [email protected]
wrote:

irb(main):005:0> remote.mount_enclosing_volume GLib::Mount::MOUNT_NONE
TypeError: GMountMountFlags is not a GFlags
from (irb):5:in `mount_enclosing_volume’
from (irb):5

This has been fixed in SVN.

On 9 September 2011 16:45, Michal S. [email protected] wrote:

passing in the GLib ‘NONE’ constant does not make any difference.

I don’t understand.

Why is GMountMountFlags not a GFlags but GFIleQueryInfoFlags is?

Where is that defined?

    G_DEF_CLASS(G_TYPE_MOUNT_MOUNT_FLAGS, "MountFlags", mount);
    G_DEF_CONSTANTS(mount, G_TYPE_MOUNT_MOUNT_FLAGS, "G_MOUNT_");

#define RVAL2GMOUNTMOUNTFLAGS(value)
RVAL2GFLAGS((value), G_TYPE_MOUNT_MOUNT_FLAGS)
#define RVAL2GMOUNTMOUNTFLAGSDEFAULT(value)
RVAL2TYPE_WITH_DEFAULT((value),
RVAL2GMOUNTMOUNTFLAGS,
G_MOUNT_MOUNT_NONE)

    G_DEF_CLASS(G_TYPE_FILE_QUERY_INFO_FLAGS, "QueryInfoFlags", 

file);
G_DEF_CONSTANTS(file, G_TYPE_FILE_QUERY_INFO_FLAGS, “G_FILE_”);
#define RVAL2GFILEMONITORFLAGSDEFAULT(value)
RVAL2TYPE_WITH_DEFAULT((value),
RVAL2GFILEMONITORFLAGS,
G_FILE_MONITOR_NONE)

#define RVAL2GFILEQUERYINFOFLAGS(value)
RVAL2GFLAGS((value), G_TYPE_FILE_QUERY_INFO_FLAGS)

On 10 September 2011 14:20, Nikolai W. [email protected] wrote:

On Fri, Sep 9, 2011 at 16:45, Michal S. [email protected] wrote:

irb(main):005:0> remote.mount_enclosing_volume GLib::Mount::MOUNT_NONE
TypeError: GMountMountFlags is not a GFlags
from (irb):5:in `mount_enclosing_volume’
from (irb):5

This has been fixed in SVN.

Oh, now I can see I guess :wink:

Thanks

Michal

On Sat, Sep 10, 2011 at 15:37, Michal S. [email protected]
wrote:

I don’t understand.

Why is GMountMountFlags not a GFlags but GFIleQueryInfoFlags is?

Where is that defined?

Yeah, I know. It’s an unfortunate naming, I think. Perhaps this will
change once GMountMountFlags gains flags beyond NONE.