Forum: Ruby-Gnome 2 find_enclosing_mountpoint docs don't match reality

Posted by Michal Suchanek (Guest)
on 2011-09-09 15:32
(Received via mailing list)
Hello.

From the docs:

find_enclosing_mount(cancellable = nil)

    Gets a GLib::Mount for the GLib::File.

    If the file doesn’t have a mount (for example, possibly a remote
share), a GLib::IO::NotFoundError will be raised.

This would imply that remote shares don't have a mountpoiont. The
opposite is observed:

 $ irb -rubygems -rgio2
irb(main):001:0> local =  GLib::File.new_for_commandline_arg 
"/somewhere"
=> #<#<Class:0x7f79e3627f50>:0x7f79e3627e88 ptr=0xdc88c0>
irb(main):002:0> remote =  GLib::File.new_for_commandline_arg
"smb://server/share"
=> #<#<Class:0x7f79e361ce98>:0x7f79e361cdd0 ptr=0xde9e70>
irb(main):003:0> local.find_enclosing_mount
GLib::IO::NotFoundError: Containing mount does not exist
  from (irb):3:in `find_enclosing_mount'
  from (irb):3
irb(main):004:0> remote.find_enclosing_mount
GLib::IO::NotMountedError: The specified location is not mounted
  from (irb):4:in `find_enclosing_mount'
  from (irb):4
irb(main):005:0>
Posted by Nikolai Weibull (Guest)
on 2011-09-10 12:32
(Received via mailing list)
On Fri, Sep 9, 2011 at 15:31, Michal Suchanek <hramrach@centrum.cz> 
wrote:

> opposite is observed:
I don’t understand what you mean.

I would suggest that you take this to the gtk-devel mailing list, as I
suspect that this is behavior dictated by GLib, not Ruby-GNOME2.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.