* gcontenttype.c (g_content_type_guess): Check whether there's a '/'
at the end of the filename, and declare it a directory.
Patch by Bastien Nocera
svn path=/trunk/; revision=7491
2008-09-14 Cosimo Cecchi <cosimoc@gnome.org>
Bug 551887 – Docs for g_desktop_app_info_new_from_filename ()
aren't clear.
* gdesktopappinfo.c: add a note in the docs clarifying what the
"filename" parameter really is.
svn path=/trunk/; revision=7481
2008-09-12 Tor Lillqvist <tml@novell.com>
* gwin32appinfo.c (g_win32_app_info_launch): Don't call
FormatMessage() etc here. Call g_win32_error_message() instead
which already does all that. Besides, the code was broken as it
called the default "A" version of FormatMessage() but still
thought it produced a wide string.
svn path=/trunk/; revision=7472
2008-09-02 Michael Natterer <mitch@imendio.com>
* *.h: big header formatting cleanup: indentation, vtable
formatting, consistent spacing in (* vfunc), trailing whitespace
removal. Formatting should be pretty consistent in all GIO headers
now.
svn path=/trunk/; revision=7433
2008-09-02 Michael Natterer <mitch@imendio.com>
* gbufferedoutputstream.h (struct _GBufferedOutputStreamClass):
fix parent_class member to be GFilterOutputStreamClass (not
GOutputStreamClass). Drop three pointers of padding, which is
exactly what GFilterOutputStreamClass adds to GOutputStreamClass,
so the class struct size stays the same.
svn path=/trunk/; revision=7427
2008-08-23 Tor Lillqvist <tml@novell.com>
Bug 548988 - g_file_replace fails on Windows when the target file
exists already
* glocalfileoutputstream.c (g_local_file_output_stream_close): On
Windows, close the file before renaming it (in case we have been
writing to a file with a temporary name).
(g_local_file_output_stream_close, handle_overwrite_open): Use
GLocalFileStat instead of plain struct stat, for passing to
_g_local_file_info_create_etag(). Thus also use _fstati64()
instead of plain fstat() on Windows.
svn path=/trunk/; revision=7388
2008-08-13 Tor Lillqvist <tml@novell.com>
* win32/gwinhttpvfs.c
* win32/gwinhttpvfs.h
* win32/gwinhttpfile.c
* win32/gwinhttpfileinputstream.c
* win32/gwinhttpfileoutputstream.c: Refactor some common code
snippets into helper functions. Check HTTP response status
codes. Implement g_winhttp_file_query_info(), looking at
Content-Length, Content-Type and Last-Modified.
* win32/winhttp.h: Add some symbolic constants that are not
publicly documented. Just a handful, so it should be OK to use
information from the Windows SDK's headers.
svn path=/trunk/; revision=7350
2008-08-13 Tor Lillqvist <tml@novell.com>
Bug 546582 - Callbacks from GFileMonitor present a GFile in the
wrong folder
* win32/gwin32directorymonitor.c
(g_win32_directory_monitor_callback): Patch by Erik van Pienbroek.
svn path=/trunk/; revision=7347
2008-08-13 Tor Lillqvist <tml@novell.com>
* win32/gwinhttpfileoutputstream.c
(g_winhttp_file_output_stream_write): Don't write the
Content-Length header ourselves, WinHttpSendRequest() takes care
of that when the dwTotalLength parameter is non-zero. Increment
offset by the number of actual bytes sent, although I wonder if
such a scenario is possible where less than requested would be
sent and accepted by the server without errors.
svn path=/trunk/; revision=7345
2008-08-13 Tor Lillqvist <tml@novell.com>
* win32/gwinhttpvfs.c
* win32/gwinhttpvfs.h
* win32/gwinhttpfile.c
* win32/gwinhttpfile.h
* win32/gwinhttpfileinputstream.c
* win32/gwinhttpfileinputstream.h
* win32/gwinhttpfileoutputstream.c
* win32/gwinhttpfileoutputstream.h: New files implementing
GWinHttpVfs and related classes, a GVfs for HTTP and HTTPS URIs on
Windows. The implementation uses the WinHttp API. Both reading and
writing are supported, i.e. GET and PUT requests. When writing,
each write call is done using a separate PUT request with a
Content-Range header. Requests for file URIs and plain pathnames
are forwarded to GLocalVfs.
* win32/winhttp.h: Reverse engineered <winhttp.h>, borrowed from
WINE. Used as there is no <winhttp.h> bundled with mingw, and
requiring people to download the Windows SDK just for this one
header is not reasonable.
* win32/Makefile.am: Add above files.
* giomodule.c: Call _g_winhttp_vfs_get_type() on Windows to set up
the plumbing for the above.
svn path=/trunk/; revision=7344
2008-08-11 Tor Lillqvist <tml@novell.com>
* Makefile.am: Put a list of the platform-dependent .la files in
the subdirectories in the platform_deps Make variable, and make
libgio-2.0.la depend on that, so that it gets relinked if one of
the dependent libraries has changed.
svn path=/trunk/; revision=7336
2008-08-11 Tor Lillqvist <tml@novell.com>
* Makefile.am (platform_libadd): Remove -lwininet which had been
added by mistake. We will probably eventually be using WinHTTP,
not the older WinInet anyway. (Actually I am working on it.)
svn path=/trunk/; revision=7335
2008-08-09 Loïc Minier <lool@dooz.org>
Bug 535124 – umask 002 not being applied for new directories, new
files get the correct umask
* gfile.c (g_file_make_directory)
(g_file_make_directory_with_parents): Document ownership and
permissions of newly created directories as being the default
ones of the process.
svn path=/trunk/; revision=7330
2008-08-08 Loïc Minier <lool@dooz.org>
Bug 535124 – umask 002 not being applied for new directories, new
files get the correct umask
* glocalfile.c: (g_local_file_make_directory): Use 0777 instead of
0755 as umask
svn path=/trunk/; revision=7323
2008-08-08 Tor Lillqvist <tml@novell.com>
* gwin32volumemonitor.c (get_connected_drives): Put questionable
code that didn't actually do anything inside #if 0, and add a
comment wondering what the code was supposed to do. This also gets
rid of a leftover debugging printout.
svn path=/trunk/; revision=7321
2008-08-04 Matthias Clasen <mclasen@redhat.com>
Bug 546017 – Don't copy attributes when copying a symlink
* gfile.c (g_file_copy_attributes): Specify
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in the call to
g_file_set_attributes_from_info. Patch by Christian Kellner
svn path=/trunk/; revision=7294
2008-08-03 Tor Lillqvist <tml@novell.com>
* win32/gwin32directorymonitor.c
(g_win32_directory_monitor_callback): Make prototype match
LPOVERLAPPED_COMPLETION_ROUTINE to avoid warning. Cast
LPOVERLAPPED parameter to local GWin32DirectoryMonitorPrivate
pointer.
(g_win32_directory_monitor_constructor):
GLocalDirectoryMonitor::dirname is in UTF-8 like all other file
names in the GLib API on Windows, so convert to UTF-16 and open
with CreateFileW().
svn path=/trunk/; revision=7290
2008-08-03 Tor Lillqvist <tml@novell.com>
Bug 541036 - Gnumeric crashes when trying to open Desktop or
user's folder under Windows
* win32/gwin32directorymonitor.c
(g_win32_directory_monitor_constructor): Ignore error from
CreateFile() when opening directory. Instead of asserting, just
store INVALID_HANDLE_VALUE then in
GWin32DirectoryMonitorPrivate::hDirectory. Also ignore error from
ReadDirectoryChangesW().
(g_win32_directory_monitor_cancel): Don't attempt to close
directory handle if it is INVALID_HANDLE_VALUE.
svn path=/trunk/; revision=7289
2008-07-30 Matthias Clasen <mclasen@redhat.com>
Bug 545457 – gdmsetup crashed with SIGSEGV in
g_unix_mount_guess_should_display()
* gunixvolumemonitor.c (get_mount_for_mount_path): Don't
crash if no mount is found.
svn path=/trunk/; revision=7274
2008-07-28 Matthias Clasen <mclasen@redhat.com>
Bug 545157 – wrong/no list of "open with" applications for .cc and
.cpp files
* gdesktopappinfo.c (get_all_desktop_entries_for_mime_type):
Collect all ancestors, not just direct parents. Pointed
out by Bastien Nocera
svn path=/trunk/; revision=7268
2008-07-27 Tor Lillqvist <tml@novell.com>
* configure.in: Set LIB_EXE_MACHINE_FLAG to either X86 or X64 on
Windows. AC_SUBST it.
* */Makefile.am: Correspondingly, pass appropriate -machine
flag to lib.exe when producing the import library for the MS
toolchain.
svn path=/trunk/; revision=7255