diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-10-20 08:42:27 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-10-20 08:42:27 +0000 |
commit | 1c139a08231098157818d66fa688a2555d961621 (patch) | |
tree | 8a19814305ab7592d2eb5642152da41f28481161 | |
parent | a975adfdb5aad84fcdf711bbd7028428e9756063 (diff) | |
download | gvfs-1c139a08231098157818d66fa688a2555d961621.tar.gz |
Import from trunk:
2008-10-20 Alexander Larsson <alexl@redhat.com>
Import from trunk:
* daemon/gvfsbackendcomputer.c (try_create_dir_monitor):
Always fail the job when we don't support monitoring.
* client/gvfsfusedaemon.c (getattr_for_file):
Correct st_blocks rounding in previous commit
svn path=/branches/gnome-2-24/; revision=2061
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | client/gvfsfusedaemon.c | 2 | ||||
-rw-r--r-- | daemon/gvfsbackendcomputer.c | 7 |
3 files changed, 14 insertions, 5 deletions
@@ -1,3 +1,13 @@ +2008-10-20 Alexander Larsson <alexl@redhat.com> + + Import from trunk: + + * daemon/gvfsbackendcomputer.c (try_create_dir_monitor): + Always fail the job when we don't support monitoring. + + * client/gvfsfusedaemon.c (getattr_for_file): + Correct st_blocks rounding in previous commit + 2008-10-17 Alexander Larsson <alexl@redhat.com> Import from trunk: diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index aab58371..d87dcf86 100644 --- a/client/gvfsfusedaemon.c +++ b/client/gvfsfusedaemon.c @@ -749,7 +749,7 @@ getattr_for_file (GFile *file, struct stat *sbuf) if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_UNIX_BLOCKS)) sbuf->st_blocks = file_info_get_attribute_as_uint (file_info, G_FILE_ATTRIBUTE_UNIX_BLOCKS); else /* fake it to make 'du' work like 'du --apparent'. */ - sbuf->st_blocks = (sbuf->st_size + 1) / 512; + sbuf->st_blocks = (sbuf->st_size + 511) / 512; /* Setting st_nlink to 1 for directories makes 'find' work */ sbuf->st_nlink = 1; diff --git a/daemon/gvfsbackendcomputer.c b/daemon/gvfsbackendcomputer.c index e9cb4927..25d6c716 100644 --- a/daemon/gvfsbackendcomputer.c +++ b/daemon/gvfsbackendcomputer.c @@ -726,10 +726,9 @@ try_create_dir_monitor (GVfsBackend *backend, if (file != &root) { - if (file != NULL) - g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR, - G_IO_ERROR_NOT_SUPPORTED, - _("Can't open mountable file")); + g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR, + G_IO_ERROR_NOT_SUPPORTED, + _("Not supported")); return TRUE; } |