[gvfs] Ignore error for pre-3.1 devices when setting modification time
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] Ignore error for pre-3.1 devices when setting modification time
- Date: Mon, 2 Nov 2009 13:49:49 +0000 (UTC)
commit e0ccf14f320f6d7b15f13bf35588d9927b8e0b12
Author: Nikias Bassen <nikias gmx li>
Date: Mon Nov 2 14:19:37 2009 +0100
Ignore error for pre-3.1 devices when setting modification time
daemon/gvfsbackendafc.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 48ee052..1e0d788 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -1085,6 +1085,7 @@ g_vfs_backend_afc_set_attribute (GVfsBackend *backend,
{
GVfsBackendAfc *self;
uint64_t mtime = 0;
+ afc_error_t err;
self = G_VFS_BACKEND_AFC(backend);
g_return_if_fail(self->connected);
@@ -1099,9 +1100,13 @@ g_vfs_backend_afc_set_attribute (GVfsBackend *backend,
mtime = *(guint64*)(value_p) * (guint64)1000000000;
- if (G_UNLIKELY(g_vfs_backend_afc_check (afc_set_file_time (self->afc_cli,
- filename, mtime),
- G_VFS_JOB(job))))
+ err = afc_set_file_time (self->afc_cli, filename, mtime);
+ if (err == AFC_E_UNKNOWN_PACKET_TYPE)
+ {
+ /* ignore error for pre-3.1 devices as the do not support setting file modification times */
+ return g_vfs_job_succeeded (G_VFS_JOB(job));
+ }
+ if (G_UNLIKELY(g_vfs_backend_afc_check (err, G_VFS_JOB(job))))
{
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]