Age | Commit message (Collapse) | Author | Files | Lines |
|
https://bugzilla.gnome.org/show_bug.cgi?id=548353
|
|
In the *_async_thread() functions, call the corresponding synchronous
function instead of calling the interface vfunc, which can be NULL.
In some cases the check for the vfunc == NULL was done, but to be
consistent it is better to always call the synchronous version (and the
code is simpler).
https://bugzilla.gnome.org/show_bug.cgi?id=548353
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=548353
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=548353
|
|
We need to close the stream *before* applying the file modes, because
g_file_replace() allocates a temporary file. At the moment we're
applying the modes to the extant file, then immediately rename()ing
over it with the default perms.
This regressed with commit 166766a89fcd173dcd6ffda11f902029928f7f28.
The real fix here is to have g_file_create_with_info() so that we can
atomically create a file with the permissions we want.
https://bugzilla.gnome.org/show_bug.cgi?id=696014
|
|
Make the btrfs support explicitly linux-only, as that is what it
is. With this, there's no need anymore to check for sys/ioctl.h
either.
https://bugzilla.gnome.org/show_bug.cgi?id=692829
|
|
There are two benefits to this:
1) We can centralize any operating system specific knowledge of
close-vs-EINTR handling. For example, while on Linux we should never
retry, if someone cared enough later about HP-UX, they could come by
and change this one spot.
2) For places that do care about the return value and want to provide
the caller with a GError, this function makes it convenient to do so.
Note that gspawn.c had an incorrect EINTR loop-retry around close().
https://bugzilla.gnome.org/show_bug.cgi?id=682819
|
|
Ok, this function was just an awful mess before. Now the problem
domain is not trivial, and I won't claim this new code is *beautiful*,
but it should fix the bug at hand, and be somewhat less prone to
failure for the next person who tries to modify it. There's only one
unref call for each object now.
https://bugzilla.gnome.org/show_bug.cgi?id=692408
|
|
That way the descriptors aren't leaked to child processes.
https://bugzilla.gnome.org/show_bug.cgi?id=692544
|
|
When an error occurs while reading the file input stream in
g_file_load_contents (e.g. because the operation was cancelled), the
code is correctly calling g_task_return_error(), but in the callback
from the close operation, g_task_return_boolean() will be called again.
Code that cleans up its state in the async callback will then be called
twice, leading to invalid memory access.
https://bugzilla.gnome.org/show_bug.cgi?id=692202
|
|
The attached patch adds support for the btrfs "clone" ioctl which
makes Copy-on-Write reflinks, resulting in cheap O(1) copies when
source/destination are on the same filesystem. The ioctl itself is
quite straightforward, and GNU coreutils has had support since 7.5
(--reflink=auto --sparse=auto).
The ioctl only operates on regular files and symlinks, and always
follows symlinks; checks have been added accordingly.
This patch would be very useful for everyone who uses btrfs
filesystems (Meego folks for instance). On systems that don't have
btrfs, or if the the source is not on a btrfs filesystem, the ioctl
returns EINVAL, and the fallback code is triggered. Hence this will
cause no problems for non-btrfs users.
https://bugzilla.gnome.org/show_bug.cgi?id=626497
|
|
Add a new GFileMonitorFlag: G_FILE_MONITOR_WATCH_HARD_LINKS. When set,
changes made to the file via another hard link will be detected.
Implement the new flag for the inotify backend.
https://bugzilla.gnome.org/show_bug.cgi?id=532815
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=661767
|
|
GIO API usually returns FALSE and sets GError when something went wrong
and it was also the case of this method, just being badly documented.
|
|
This function does in fact return G_IO_ERROR_NOT_DIRETORY, and
not G_FILE_ERROR_NOTDIR.
|
|
Add a pair of new APIs: one to GFile to create a new file from a
commandline arg relative to a given cwd and one to
GApplicationCommandLine to create a GFile from an arg, relative to the
cwd of the invoking commandline.
https://bugzilla.gnome.org/show_bug.cgi?id=689037
|
|
Reimplement gioscheduler in terms of GTask, and deprecate the original
gioscheduler methods. Update docs to point people to GTask rather than
gioscheduler and GSimpleAsyncResult, but don't actually formally
deprecate GSimpleAsyncResult yet.
https://bugzilla.gnome.org/show_bug.cgi?id=661767
|
|
|
|
The fallback copy code was leaking the GFileInfo if it didn't have
G_FILE_ATTRIBUTE_STANDARD_TYPE.
https://bugzilla.gnome.org/show_bug.cgi?id=682560
|
|
|
|
Simplify logic by only looking at whether we have a GError and
not also using return codes.
https://bugzilla.gnome.org/show_bug.cgi?id=680823
|
|
If g_file_get_parent() unexpectedly failed, we could return
FALSE but with no error.
https://bugzilla.gnome.org/show_bug.cgi?id=680823
|
|
The patch from b0bce4ad triggered segfaults - see:
http://redmine.yorba.org/issues/5656
We were clearing the error before dereferencing it in the next
go-around of the while loop - this wasn't necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=680823
|
|
When creating a directory fails for some reason other than
the parent not existing, don't clear the error before we try
to propagate it.
To reproduce, run 'ostadmin init' on /ostree or otherwise try to
run the function on a directory with a parent directory where the
current user is not allowed to write.
https://bugzilla.gnome.org/show_bug.cgi?id=680823
|
|
Particularly for someone programming on Unix, this helps them
understand that we will unlink symbolic links, and not follow them.
|
|
This looks like it was stubbed out but not implemented; the vtable
entry dates to commit 3781343738de4abddf56982325a77bd70a98cd26 which
is just alex's initial merge of gio into glib.
I was working on some code that wants an asynchronous rm -rf
equivalent, and so yeah, this is desirable.
https://bugzilla.gnome.org/show_bug.cgi?id=680760
|
|
Finish deprecating the "handle GSimpleAsyncResult errors in the
wrapper function" idiom (and protect against future GSimpleAsyncResult
deprecation warnings) by adding a "legacy" GAsyncResult method
to do it in those classes/methods where it had been traditionally
done.
(This applies only to wrapper methods; in cases where an _async
vmethod explicitly uses GSimpleAsyncResult, its corresponding _finish
vmethod still uses g_simple_async_result_propagate_error.)
https://bugzilla.gnome.org/show_bug.cgi?id=667375
https://bugzilla.gnome.org/show_bug.cgi?id=661767
|
|
Originally, the standard idiom with GSimpleAsyncResult was to handle
all errors in the _finish wrapper function, so that vmethods only had
to deal with successful results. But this means that chaining up to a
parent _finish vmethod won't work correctly. Fix this by also checking
for errors in all the relevant vmethods. (We have to redundantly check
in both the vmethod and the wrapper to preserve compatibility.)
https://bugzilla.gnome.org/show_bug.cgi?id=667375
https://bugzilla.gnome.org/show_bug.cgi?id=661767
|
|
The "mainloop_barrier" in copy_async_thread() is unnecessary, since
the g_simple_async_result_complete_in_idle() will be queued after all
of the g_io_scheduler_job_send_to_mainloop_async()s, and sources with
the same priority will run in the order in which they were queued.
https://bugzilla.gnome.org/show_bug.cgi?id=661767
|
|
Fixes: https://bugzilla.gnome.org/676208
|
|
|
|
The logic here is pretty twisted, but basically we were leaking a ref
for each non-existent parent. The clearest way to fix this was to
move to more explicit refcounting logic; when a variable is pointing
to an object, it holds a ref.
https://bugzilla.gnome.org/show_bug.cgi?id=675446
|
|
Found these thanks to improved gobject-introspection GTK-Doc
comment block/annotation parser from:
https://bugzilla.gnome.org/show_bug.cgi?id=672254
https://bugzilla.gnome.org/show_bug.cgi?id=673385
|
|
Found using:
find . -name '*.c' | xargs grep 'or %NULL' | grep ' \* @' | grep -v '@error' | grep -v allow-none
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=667447
|
|
|
|
This breaks autotestkeyword.cc from gtk+.
|
|
A convenience function that creates a temporary file and returns
a GFile and GFileIOStream for it.
The file is created using g_file_open_tmp.
https://bugzilla.gnome.org/show_bug.cgi?id=657085
|
|
g_file_set_attribute() also permits a NULL value for value_p, and requires it
to be NULL to unset it. Also fix the wrong variable name in the documentation.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
|
|
progress_callback in g_file_copy and g_file_copy_async may be NULL.
Annotations should reflect that. Pointed out by Carlo Teubner.
https://bugzilla.gnome.org/show_bug.cgi?id=664415
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=656679
|
|
g_file_make_directory_with_parents() will fail for already
existing directories, unlike g_mkdir_with_parents(), so mention
this clearly in the docs.
https://bugzilla.gnome.org/show_bug.cgi?id=660791
|
|
|
|
Spelling fixes in comments and docs, provided by
Kjartan Maraas in bug 657336.
|
|
|
|
Unsetting won't work on all attributes. Currently, only
metadata attributes are supported.
https://bugzilla.gnome.org/show_bug.cgi?id=620423
|
|
_GNU_SOURCE must be defined before including any other (system)
header, so defining it in glib-unix.h (and hoping no one has included
anything else before that) is wrong. And the "#define _USE_GNU"
workaround for this problem in gnetworkingprivate.h is even wronger
(and still prone to failure anyway due to single-include guards).
Fix this by defining _GNU_SOURCE in config.h when building against
glibc. In theory this is bad because new releases of glibc may include
symbols that conflict with glib symbols, which could then cause
compile failures. However, most people only see new releases of glibc
when they upgrade their distro, at which point they also generally get
new releases of gcc, which have new warnings/errors to clean up
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=649201
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=645789
|
|
Also make parameter names in virtual function declarations consistent
to silent g-ir-scanner.
|