| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The file_transfer function contains a statement ensuring that the operation
fails when files are on different mounts. But this statement is never reached.
This case is correctly handled inside the create_proxy_for_file2 functio. Let's
remove the dead code.
|
|
|
|
|
|
|
|
|
| |
The push/pull methods rely on local paths. This is a problem for Flatpak
applications because the GVfs daemons run outside of it, so the same local
path might refer to a different file. Let's disable the push/pull methods
for Flatpak applications to fix errors when moving/copying.
Related: https://github.com/flathub/org.libreoffice.LibreOffice/issues/23
|
|
|
|
|
|
|
|
| |
Recently added warnings when peer-to-peer connection fails (commit 60ca0cea)
makes visible old bug that the session bus fallback is tried regardless of
the fact that the operation was cancelled. Let's stop the operation
immediately when G_IO_ERROR_CANCELLED is returned and don't print the
warnings in this case.
|
|
|
|
|
|
| |
Asynchronous API fallbacks to session bus when peer-to-peer connection
fails, however, synchronous API fails in the same case. Let's add
fallback to session bus also for the synchronous case.
|
|
|
|
|
|
|
| |
When peer-to-peer connection fails, the session bus is silently used
instead by the asynchronous API. Let's add warnings to make it more
obvious and mention that --filesystem=xdg-run/gvfsd is probably
missing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Restoring files from the trash folder is slow in Nautilus as it attempts
to do it recursively. This is because G_IO_ERROR_NOT_SUPPORTED is
returned from g_file_move when G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag is
used. The error is returned from client-side for pull/push operations
after commit 2e765449 as in the most cases the copy-and-delete approach
is really used there. But the problem is that it is not in all
cases, like in the trash backend case, where the native move operation
is used in fact. Let's handle the G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag
directly in the backends, but not in the trash backend.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1589
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mount info cache invalidation is not handled properly and thus client
can get "Cache invalid, retry (internally handled)" internal error, which
should not be passed to the client. This can happen if mount was unmounted
and another mount for the some location is mounted. This is now more
common with introducing stable URIs for MTP backend. G_VFS_ERROR_RETRY
error handling was probably lost as a consequence of GDBus port by commit
622a5c0d. Let's retry the operation internally again if G_VFS_ERROR_RETRY
is returned.
https://gitlab.gnome.org/GNOME/gvfs/merge_requests/30
|
|
|
|
|
|
|
|
|
|
| |
g_daemon_file_equal() always return FALSE for files with different
mount_prefix even though the files can be equal. It happen when comparing
two files from different origins, e.g. g_mount_get_root() and
g_file_new_for_uri(). Let's do the same which is done in _prefix_matches
and _get_relative_path in order to fix this issue.
https://bugzilla.gnome.org/show_bug.cgi?id=786217
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g_daemon_file_get_relative_path() fails for files with different
mount_prefix and always return NULL. It happen when comparing two files
from different origins, e.g. g_mount_get_root() and g_file_new_for_uri().
On the other hand, g_daemon_file_prefix_matches() can succeed in cases,
where paths don't have the same prefixes, because it just compares
mount_prefix of a parent with a path of a descendant, but a path of the
parent is ignored.
The code concatenates mount_prefix with a path, so the comparison never
succeeds if mount_prefix is set, because mount_prefix is already part of
the path in GDaemonFile. Let's ignore mount_prefix when comparing and
always compare the paths, so we can significantly simplify the code.
https://bugzilla.gnome.org/show_bug.cgi?id=786217
|
|
|
|
|
|
| |
Fix an if condition that resulted in trying to strdup(0x1).
https://bugzilla.gnome.org/show_bug.cgi?id=786217
|
|
|
|
|
|
|
|
|
| |
async_construct_proxy() calls g_object_ref() on connection, because
the connection is unrefed by async_call_finish(). The returned connection
might be NULL in some cases and g_bus_get() is called instead. However,
g_bus_get_finish() is "transfer full" and thus one reference is leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
|
| |
Caller's errors are modified by g_dbus_error_strip_remote_error. Strip
the dbus error in the caller directly.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
|
|
| |
GSimpleAsyncResult is deprecated in favour of GTask and should be replaced.
Based on patch from Dan Winship.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
|
|
| |
Flags are not passed in write operations on the client side currently,
so the daemons always use G_FILE_CREATE_NONE when writting. Pass the
flags in to fix this regression...
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
| |
The uri variable is just set, but never used.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
|
|
|
|
|
|
| |
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772219
|
|
|
|
| |
ugh sorry
|
|
|
|
|
|
|
|
|
|
| |
We were checking for the newly created data cancellable,
which is wrong. That was causing that mounting encloused
volumes were not cancellable at all.
Check for the actual GCancellable parameter to fix it.
https://bugzilla.gnome.org/show_bug.cgi?id=753735
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want to have dependency on udev in client part of gvfs due
to app sandboxing. Thus move the code into the metadata daemon and
get tree name via dbus.
Common code to get metadata proxy has to be moved in metatree code.
Mentioned changes caused that unistd.h is also included in
meta-get-tree.c and cause symbol redeclaration error. Variable
"pause" has to be renamed to avoid this conflict.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
d59e6873086f ("Fix 'path[12]_out' leak in file_transfer()") assumed that
path[12]_out were always set by create_proxy_for_file2 but this is not
always the case. Fix it so that create_proxy_for_file2 always sets
path[12]_out.
To reproduce the bug:
$ gvfs-copy --progress smb://host/unmounted/a smb://host/unmounted/b
Segmentation fault (core dumped)
https://bugzilla.gnome.org/show_bug.cgi?id=749462
|
|
|
|
|
|
|
|
|
| |
Since commit b358ca "Make sure metadata is always returned by
query_writable_namespaces()", query_writable_namespaces() is expected to
return non-NULL values. There is one error case where it's not currently
doing that.
https://bugzilla.gnome.org/show_bug.cgi?id=747362
|
|
|
|
|
|
|
| |
This makes the common (non-error) case more linear, and thus a bit more
readable. This is in preparation for the next commits.
https://bugzilla.gnome.org/show_bug.cgi?id=747362
|
|
|
|
|
|
|
| |
These functions return pointers, so it's better to return NULL rather
than FALSE.
https://bugzilla.gnome.org/show_bug.cgi?id=747360
|
|
|
|
|
|
|
|
|
| |
file_transfer() calls create_proxy_for_file2() passing it 'path1_out'
and 'path2_out' arguments. These return values are newly allocated
strings, so they must be freed when no longer used. This fixes a leak
reported by valgrind.
https://bugzilla.gnome.org/show_bug.cgi?id=747361
|
|
|
|
|
|
|
|
|
|
|
| |
create_proxy_for_file2() will only set the *path2_out return value if a
mount info was found for the 'file2' argument. However, as this return
value must be freed, it's much better to set 'path2_out' to NULL rather
than leave it unset. This way the caller can call g_free() on the
returned value without having to set 'path2_out' to NULL before calling
create_proxy_for_file2.
https://bugzilla.gnome.org/show_bug.cgi?id=747361
|
|
|
|
|
|
|
|
|
|
| |
It can fail when e.g. database file is corrupted or doesn't have
correct permissions. This patch also adds warnings to be possible
determine reason why initialization failed.
It is based on patches from Matthew W. S. Bell and Ross Lagerwall.
https://bugzilla.gnome.org/show_bug.cgi?id=598561
|
|
|
|
|
|
|
|
|
| |
When using Copy, Move, Push and Pull with progress callbacks, the
progress callbacks increment the connection serial, so retrieve the
serial immediately after the dbus method call so that the correct serial
is used for cancellation.
https://bugzilla.gnome.org/show_bug.cgi?id=720058
|
|
|
|
|
|
| |
Replace a hand-rolled partial string duplication with g_strndup.
https://bugzilla.gnome.org/show_bug.cgi?id=739233
|
|
|
|
|
|
|
|
|
|
| |
2a0dc68c7eeb ("client: Remove inconsistencies between async and sync
variants") introduced a regression which causes find_enclosing_mount to
segfault if a non-NULL GError** is passed in. Fix this. Also, only
call g_dbus_error_strip_remote_error () on GErrors that have come from
dbus.
https://bugzilla.gnome.org/show_bug.cgi?id=739075
|
|
|
|
|
|
|
| |
The async implementation of find_enclosing_mount does not assume that
there is a GMountInfo when no error has occurred.
https://bugzilla.gnome.org/show_bug.cgi?id=739075
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=739075
|
|
|
|
|
|
|
|
|
|
| |
The call to g_daemon_mount_new is a call to g_object_new like any
other. There is no point in checking if g_object_new failed to create
an object, because it will always succeed unless we have run out of
virtual address space and in that case the program will be aborted
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=739075
|
|
|
|
|
|
|
| |
Fail if G_FILE_COPY_NO_FALLBACK_FOR_MOVE is specified and either a pull
or a push is going to be executed.
https://bugzilla.gnome.org/show_bug.cgi?id=737510
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return NULL as per the documentation rather than returning the original
file. This prevents errors like the following, where "Permission
Denied" should be displayed:
$ gvfs-rename smb://localhost/tmp/cat dog
Rename successful. New uri: smb://localhost/tmp/cat
(gvfs-rename:1385): GLib-GObject-CRITICAL **: g_object_unref: assertion
'G_IS_OBJECT (object)' failed
https://bugzilla.gnome.org/show_bug.cgi?id=727007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backends receive a TRUNCATE message which contains a size parameter.
Truncation is signaled with a TRUNCATED message (which contains no other
useful information).
In more detail:
Add a new dbus method, OpenForWriteFlags, which has a flags parameter to
implement can_seek and can_truncate. These flags are used in
GDaemonFileOutputStream. Compatability with old clients is maintained.
Implement the can_truncate and truncate_fn GDaemonFileOutputStream
methods.
Add two new message types to the daemon socket protocol:
G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_TRUNCATE
G_VFS_DAEMON_SOCKET_PROTOCOL_REPLY_TRUNCATED
Add a new job type, GVfsJobTruncate.
Add two new methods to GVfsBackend which backend classes can implement:
truncate and try_truncate
https://bugzilla.gnome.org/show_bug.cgi?id=573837
|
|
|
|
|
|
|
|
| |
If the daemon is killed during the fallback copy, it is possible that
proxy is NULL which causes a segfault when unrefing it. Use
g_clear_object() instead.
https://bugzilla.gnome.org/show_bug.cgi?id=711454
|
|
|
|
|
|
|
| |
Check for NULL before using the mount_operation given to any of
GDaemonFile's methods to prevent a crash due to refing NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=710995
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=591228
|
|
|
|
|
|
| |
This code is not used anymore
https://bugzilla.gnome.org/show_bug.cgi?id=708744
|
|
|
|
|
|
|
|
| |
There is no need to listen to messages on other connections than
the one we sent the request on. In fact, doing so is bad as it can cause
locking issues as per bug 708721.
https://bugzilla.gnome.org/show_bug.cgi?id=708744
|
|
|
|
|
|
|
|
|
|
|
|
| |
If two files have two different origins (say, one from g_mount_get_root()
and one from g_file_new_for_uri()), the mount_spec they use could
expose a different mount_prefix, even if the represent the same URI
and network object.
This in particular fixes the handling of shadow mounts for dav
(which rewrites the mount_spec during mount to find the right prefix)
https://bugzilla.gnome.org/show_bug.cgi?id=696279
|
|
|
|
|
|
|
| |
Certain operations may take a lot of time to complete, don't timeout
on that. Use cancellable if you need to control the flow.
https://bugzilla.gnome.org/show_bug.cgi?id=687534
|
| |
|
|
|
|
|
| |
Found out that if the remote call fails, some variables are left
uninitialized and causes assertion failures while we don't need them.
|
| |
|
|
|
|
|
|
| |
This hopefully covers all public methods.
Seems like this fixes several memleaks as well.
|
| |
|
| |
|
|
|
|
|
| |
Use G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS and G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
flags where applicable.
|
| |
|