| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=614401
|
| |
|
|
|
|
|
|
|
|
|
| |
After the delete op, cache was invalidated and an attempt was made to retrieve
file size in do_pull() while data connection was already opened. This patch
only moves all necessary operations before setting up actual data stream for
download.
Fixes bug 610395
|
|
|
|
| |
Just ignore the keyring then.
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=560357
https://bugzilla.gnome.org/show_bug.cgi?id=561998
|
|
|
|
| |
Otherwise it may be used uninitialized if progress_callback is NULL
|
|
|
|
|
|
|
|
| |
This allows Nautilus to check for FAILED_HANDLED and not displaying an
error dialog to the user. Users don't like error dialogs thatdo nothing
but tell them what they just did.
Partial fix for https://bugzilla.gnome.org/show_bug.cgi?id=594495
|
| |
|
| |
|
| |
|
|
|
|
| |
Don't leak output filedescriptor
|
|
|
|
| |
Re-add from commit 9c80d1ea68314ccd3b44d3a6c3761b1e42699953
|
|
|
|
| |
The matcher is ignored in g_file_info_copy_into().
|
|
|
|
|
|
|
|
| |
The code previously did update the write counters after being
interrupted for progress updates. That would cause it to insert a random
byte for every time it sent a progress update from the write loop.
Noticed by Tomas Bzatek - sorry about your mp3s :(
|
|
|
|
|
| |
Duplicate the machinery for returning the proper error when the source
is a directory from gio and use it in the pull vfunc.
|
|
|
|
|
| |
As gvfs_job_enumerate_add_info() modifies the passed info, we cannot
pass the cached items directly. So we do a copy instead.
|
|
|
|
|
|
|
| |
This way, we don't leave empty target files when opening the source
resulted in an error.
Also included is some code clarification.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Port everything to use _with_operation() variants of unmount/eject
methods
- Add support for g_file_poll_mountable()
- new job class: GVfsJobPollMountable
- Pass mount operation for unmount/eject ops on GDaemonFile and
GDaemonMount
- receive in the appropriate GVfsJob classes
- also pass unmount flags where it was missing
- port all backends to use this
- Teach GMountSource and GMountOperationDBus about the new
GMountOperation::show-processes signal
- also provide new API
- g_mount_source_is_dummy() - e.g. when the client didn't
passed NULL for the GMountOperation
- g_mount_source_abort() - to send the ::abort signal to the
client-side GMountOperation
- make the client-side of GMountSource return ::reply with
NOT_HANDLED when we do an abort
- Refactor the mount operation handling in GProxyVolumeMonitor
- Pass mount operation for unmount/ejects in GProxyVolumeMonitor
- Pass the process id of the actual reader/writer in OpenForRead
and OpenForWrite daemon methods
- add some private API for making the FUSE client set the
pid of the POSIX client (otherwise it looks like the FUSE
client is blocking) and pass the right pid.
This is because the FUSE client is basically impersonating the
POSIX processes.
- Make the process id mentioned above available in appropriate
GVfsJob classes
- GVfsJobOpenForRead
- GVfsJobOpenForWrite
- GVfsChannel
- Provide API to get a list of all blocking clients, e.g. an array
of GPid
- g_vfs_daemon_get_blocking_processes()
- Provide convenience API to easily doing the right thing on unmount;
e.g. interact with the user about blocking processes - see the gphoto2
backend for example usage
- g_vfs_backend_has_blocking_processes()
- g_vfs_backend_unmount_with_operation() and
g_vfs_backend_unmount_with_operation_finish()
- Only the gphoto2 backend supports ::show-processes right now. Support
for other backends will be added shortly.
- Implement support for ::show-processes in the GDU volume monitor
- right now we don't support "Unmount Anyway" since it requires
ABI changes in libgdu.so - this will be changed as soon as there's
a new gnome-disk-utility release
|
| |
|
|
|
|
|
|
| |
adds a bunch of new APIs necessary for supporting active FTP. These APIs
don't do anything yet, as active FTP is still unsupported, it's just
refactoring of code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new code doesn't rely on funny workaround flags anymore and also
doesn't set workaround flags unconditionally after any failure.
It now works like this:
1) if a default method exists, try the default method.
2) if the default method failed, try all methods in order until one succeeds.
3) if any method succeeded, make it the new default method.
This way, we take the proper method by default, and have a proper
fallback mechanism for flaky connections/servers that sometimes fail to
connect properly.
Also, it's much easier to add new methods (like active FTP) later.
|
|
|
|
|
| |
use get_data_stream() instead and call read/write on that manually.
Reduces the number of API.
|
|
|
|
| |
Add a separate function for requesting the debug id
|
|
|
|
|
| |
permission handler now sets EPERM when file exists and ENOENT when it
doesn't.
|
|
|
|
|
| |
Try to return EPERM when there's a permission problem instead of
returning the default error code "Operation failed".
|
|
|
|
|
|
|
| |
Fix FIXME that complained about not having access to the cache from
error handlers.
Now that we have access, we can use it to check if a file exists and/or
is a directory instead of issuing some commands manually.
|
|
|
|
|
|
|
|
|
|
| |
The directory cache needs a callback to lookup uncachable files.
Uncachaable files are files that can be accessed but where the parent
directory cannot be listed.
This has to go into the directory cache, as the directory cache performs
symlink resolving and looking up symlinks may encounter such files.
Fixes a testcase in Andreas' test collection.
|
|
|
|
|
|
|
|
|
|
| |
Now that a corner case in glib was fixed, it's possible to use
g_cancellable_reset() and reuse the cancellable after timeouts instead
of creating a new one.
If you want to avoid random hangs and g_critical()s when transferring
files, you need glib commit ced88fd0de4aedb537552561582875b427081eeb
I've update the glib requirements accordingly.
|
|
|
|
|
|
| |
I'm not sure why the function claimed 550 answers to CWD commands would
indicate that the path is a directory, but /dev/null certainly is not a
directory.
|
|
|
|
|
|
|
|
|
| |
The progress callbacks are throttled to at most once per second to not
overload dbus for very fast connections. This is implemented somewhat
ugly using a cancellable that interrupts once per second to ensure
progress updates are sent.
If someone knows a saner approach, please tell me (or better: provide a
patch).
|
|
|
|
| |
Progress updates are not sent yet.
|
|
|
|
| |
fixes an assertion
|
|
|
|
|
| |
- replace tabs with 8 spaces
- remove spaces at end of line
|
|
|
|
|
| |
- print LIST replies again
- make connections have a debug id and use it for debugging prints
|
|
|
|
|
|
| |
The cache handling has been split into a separate file and structure
now. While the API still isn't perfect, it's much clearer than before.
It's also faster when looking up lots of symlinks.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
split out the old FtpConnection struct into a separate GVfsFtpTask
structure that acts as a one-stop solution to vfuncs. It keeps track of
all important structures:
- the backend
- the current job
- the potential connection to the server
- the error state
during the lifetime of a backend vfunc and supplies convenience
functions to ease implementing these vfuncs. The API of gvfsftptask.h is
documented.
|
|
|
|
|
| |
Next step in cleaning up the ftp backend: Split out FtpFile, which is
used for the proper translation between FTP paths and gvfs paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the current FtpConnection object is not flexible enough. It is doing too
many things at once, namely:
1) handling a physical connection to the ftp server
2) handling a GVfsJob's lifetime
Also, the file gvfsbackendftp.c is too big, counting >2000 lines.
This is the first step in an attempt to separate these two things. It
splits out the physical connection into different files and makes the
old FtpConnection code use this instead.
A side effect of this is that it includes a change so that reading lines
is now done with a GDataInputStream instead of manually, as suggested by
Alex.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use:
if (error)
/* error handling */
else
/* normal code */;
return;
Instead use:
if (error) {
/* error handling */
return;
}
/* normal code */
return;
This avoids lots of indentation for normal code and clarifies what the
default flow of the code is.
|
|
|
|
|
|
|
| |
Save the address of the current connection, so that for future
connections, we are sure to connect to the same machine.
The idea here is to avoid using mirrors that have a different state,
which might cause Heisenbugs.
|
|
|
|
|
|
| |
This removes all traces of libsoup and uses gnio replacement functions
instead. Note that various things have subtle differences, so expect new
bugs.
|
|
|
|
|
|
| |
There is no need to make the root file info backend specific, as it just
returns a bunch of default values anyway. Also, we want to use the host
display name in there.
|
|
|
|
|
| |
Previously we used soup_address_get_name() to query the host name on
demand, but this will not be possible with gnio.
|
|
|
|
|
|
|
|
| |
This is in preparation to both making directory listing caches simpler
and to prepare for a gnio switch.
The code gets rid of reading the directory listing line by line and
instead reads it as one big chunk and splits it into lines upon parsing.
|
| |
|
|
|
|
|
|
| |
While it oesn't hurt either, I'm removing it because it violates the
rule that data connections should be closed before receiving the reply
indicating the transfer is done on the command connection.
|
|
|
|
|
|
|
| |
Use 64-bit strtoull() instead of 32-bit strtoul()
when converting string to number.
https://bugzilla.redhat.com/show_bug.cgi?id=499286
|
|
|
|
|
| |
The previous function was looking ugly due to early returns.
This caused leaks and made it hard to read.
|
|
|
|
|
|
| |
Don't bail out early, always try to find hidden files directories.
Fixes case when there's a symlink to a subdir of a
hidden directory which we can't enumerate. (#559142)
|
|
|
|
|
|
|
|
|
|
| |
Various fixes for sending the OPTS command:
1) only send it after we're sure we've read the FEAT response (which
moves it to after the login)
2) ignore potential errors from the OPTS command
Also fixes:
Bug 580124 – Copying from FTP crashes
|