2009-03-16 Alexander Larsson <alexl@redhat.com>
Bug 575555 – Use fsync() when replacing files to avoid data loss on crash
* configure.in:
Look for fsync().
* glib/gfileutils.c:
(write_to_temp_file):
fsync temp file if destination file exists
2009-03-16 Alexander Larsson <alexl@redhat.com>
Bug 575555 – Use fsync() when replacing files to avoid data loss on crash
* glocalfileoutputstream.c:
(g_local_file_output_stream_close):
(_g_local_file_output_stream_replace):
fsync temp file before closing if replacing target file
svn path=/trunk/; revision=7991
2009-03-04 Alexander Larsson <alexl@redhat.com>
Bug 573970 – crash in gunixvolumemonitor:update_mounts when unmounting
* gunionvolumemonitor.c:
(g_union_volume_monitor_dispose):
Run dispose on child monitors when disposing.
* gunixvolumemonitor.c:
Remove all volumes and mount on dispose to avoid circular
dependencies not freeing the monitor
svn path=/trunk/; revision=7957
2009-03-03 Alexander Larsson <alexl@redhat.com>
Bug 561172 – gnome-open fails on local URIs with anchors
* gdesktopappinfo.c:
Don't force uris to filenames if the uri has an anchor, because
that would strip the anchor.
* glocalvfs.c:
Strip anchor from file:// uris when creating GFile, since
g_filename_from_uri doesn't handle them.
svn path=/trunk/; revision=7953
2009-03-03 Alexander Larsson <alexl@redhat.com>
Bug 562613 – Missing const modifier in string parameters
* gfileinputstream.[ch]:
* gfileoutputstream.[ch]:
* glocalfileinfo.[ch]:
Make string arguments const if used as such.
svn path=/trunk/; revision=7952
2009-03-03 Alexander Larsson <alexl@redhat.com>
* glocalfile.c (g_local_file_query_filesystem_info):
Handle filesystems no supporting reporting how much is free.
This fixes bug 573454 where the filesystem not supporting this
is the gvfs smb backend over the fuse filesystem.
svn path=/trunk/; revision=7951
* giomodule.c: Use a separate lock for extension point registration
to avoid deadlock. Discovered by Torsten Schoenfeld
svn path=/trunk/; revision=7935
2009-02-27 Alexander Larsson <alexl@redhat.com>
* giomodule-priv.h:
* giomodule.c:
Split out the extension point registration code to its
own function.
* glocalvfs.c:
Ensure extension points are registered before extending it.
It might not have happened yet if g_vfs_get_local() is called.
svn path=/trunk/; revision=7919
2009-02-26 Alexander Larsson <alexl@redhat.com>
Bug 540461 – g_memory_output_stream_get_data_size() doesn't behave as document
* gmemoryoutputstream.c:
Track actual valid size, even if we later seek back.
* tests/memory-output-stream.c:
Add testcase
svn path=/trunk/; revision=7916
2009-02-26 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
Support desktop file key X-GIO-NoFuse which disables
use of fuse pathnames for %u and %U arguments.
svn path=/trunk/; revision=7914
2009-02-25 Alexander Larsson <alexl@redhat.com>
Bug 570073 – Add support for reading filesystems on Interix
* gunixmounts.c (_g_get_unix_mounts):
Support Interix. Patch from Fabian Groffen
svn path=/trunk/; revision=7911
2009-02-20 Alexander Larsson <alexl@redhat.com>
* gcontenttype.c:
(g_content_type_guess):
Don't ever sniff desktop files when the filename is known.
In other words, only allow desktop files with the .desktop extension
and when the filename isn't known.
This is a security precaution since desktop files can execute
arbitrary code when launched and we don't want to allow them to
try and hide as another type. There is no legit reason to not
have the .desktop extension anyway.
svn path=/trunk/; revision=7892
2009-02-19 Alexander Larsson <alexl@redhat.com>
Bug 549298 – impossible to copy files with p (pipe) flag
* gfile.c:
(file_copy_fallback):
Error out if the source file is a special file
svn path=/trunk/; revision=7885
2009-02-18 Alexander Larsson <alexl@redhat.com>
Bug 560564 – Replacing a symlink with its linked file truncates the original file
* gioenums.h:
Add G_FILE_CREATE_REPLACE_DESTINATION
* glocalfileoutputstream.c:
(handle_overwrite_open):
(_g_local_file_output_stream_replace):
Handle G_FILE_CREATE_REPLACE_DESTINATION when overwriting files.
* gfile.c:
(file_copy_fallback):
Pass G_FILE_CREATE_REPLACE_DESTINATION to g_file_replace when copying
with overwrite.
svn path=/trunk/; revision=7880
2009-02-17 Ryan Lortie <desrt@desrt.ca>
* gfileinfo.c: unref the destination's attribute matcher before
overwriting it.
svn path=/trunk/; revision=7879
* gmountoperation.[hc]: Add an "aborted" signal to abort a
mount operation from the backend side.
* gvolume.h: Add docs regarding the "aborted" signal.
svn path=/trunk/; revision=7866
2009-02-13 Ryan Lortie <desrt@desrt.ca>
Bug 505042 – add file attribute for actually used file size in bytes
* gfileinfo.h: add G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE define to
"standard::allocated-size"
* gfileattribute.c: document
* glocalfileinfo.c: set the allocated size from st_blocks * 512
svn path=/trunk/; revision=7865
2009-02-16 Ryan Lortie <desrt@desrt.ca>
Bug 571598 – GAsyncResult with NULL gobject
* gsimpleasyncresult.c: remove various assertions and add some checks
to allow for a NULL source_object in GSimpleAsyncResult.
svn path=/trunk/; revision=7864
2009-02-04 Alexander Larsson <alexl@redhat.com>
Bug 566747 - URIs opened with firefox %u load as local files
* gdummyfile.c (g_dummy_file_get_path):
Dummy files are never used for local paths, so always return NULL
in get_path().
svn path=/trunk/; revision=7849
2009-01-29 Ryan Lortie <desrt@desrt.ca>
* gioerror.c (g_io_error_from_errno): handle all possible cases of
EAGAIN and EWOULDBLOCK being (un)defined and (un)equal.
svn path=/trunk/; revision=7836
2009-01-28 Ryan Lortie <desrt@desrt.ca>
Bug 568575 – _async functions for GDataInputStream
* gdatainputstream.h:
* gdatainputstream.c: add _async versions of read_line and read_until.
* gio.symbols:
* ../docs/reference/gio/gio-sections.txt: add new functions
* tests/sleepy-stream.c: new test case for async read line
* tests/Makefile.am: add new test
svn path=/trunk/; revision=7835
2009-01-22 Ryan Lortie <desrt@desrt.ca>
Bug 568723 – g_buffered_input_stream_fill_async doesn't take count == -1
* gbufferedinputstream.c (g_buffered_input_stream_fill_async,
g_buffered_input_stream_fill): check for count < -1 instead of count <
0 and copy modified check to non-async version for consistency.
document the "count = -1" API.
svn path=/trunk/; revision=7828
2009-01-22 Ryan Lortie <desrt@desrt.ca>
Bug 568741 – g_buffered_input_stream_fill_async doesn't work
* gbufferedinputstream.c (fill_async_callback): grow the buffer tail
after we have successfully read data from the base stream
svn path=/trunk/; revision=7827
2009-01-20 Ryan Lortie <desrt@desrt.ca>
Bug 568394 – dropping the last reference to a stream filter closes the
base stream
* gfilterinputstream.h:
* gfilterinputstream.c: add "close-base-stream" property and only
close the base stream if it is true. issue async close callbacks from
correct source object.
* gfilteroutputstream.h:
* gfilteroutputstream.c: add a "close-base-stream" property and only
close the base stream if it is true. issue async close callbacks from
correct source object.
* gbufferedoutputstream: check g_filter_output_stream_get_close_base()
before closing the base stream. fix invalid source tag comparison in
close_async (was comparing to flush_async).
* ../docs/reference/gio/gio-sections.txt:
* gio.symbols: add
g_filter_{in,out}put_stream_{g,s}et_close_base_stream
* tests/filter-streams.c: new test cases
* tests/Makefile.am: add new test
* tests/.gitignore: add new test
svn path=/trunk/; revision=7825