summaryrefslogtreecommitdiff
path: root/gvfs
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com>2008-11-18 11:43:35 +0100
committerTomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com>2008-11-18 11:43:35 +0100
commiteb9c9d72d0dcca73211eb7875bd0f13bb220a98a (patch)
treec8ca6b4deab7ca0ee7542199cb298b0f45000d0f /gvfs
parent4714471657ae765200a3ccae6d41f35f39711eee (diff)
downloadtuxcmd-modules-eb9c9d72d0dcca73211eb7875bd0f13bb220a98a.tar.xz
GVFS plugin: copy flags cleanup
Diffstat (limited to 'gvfs')
-rw-r--r--gvfs/gvfs.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gvfs/gvfs.c b/gvfs/gvfs.c
index 95a9d0e..41aeb70 100644
--- a/gvfs/gvfs.c
+++ b/gvfs/gvfs.c
@@ -31,8 +31,8 @@
-#define VERSION "0.1.6"
-#define BUILD_DATE "2008-11-17"
+#define VERSION "0.1.7"
+#define BUILD_DATE "2008-11-18"
#define DEFAULT_BLOCK_SIZE 0x10000 /* 64kB */
#define CONST_DEFAULT_QUERY_INFO_ATTRIBUTES G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_STANDARD_NAME "," \
@@ -168,7 +168,7 @@ ask_password_cb (GMountOperation *op,
password_save = VFS_PASSWORD_SAVE_NEVER;
if (globs->callback_ask_password) {
- fprintf (stderr, " (II) Spawning callback_ask_password (0x%.16llX)...\n", (unsigned long long) globs->callback_ask_password);
+ fprintf (stderr, " (II) Spawning callback_ask_password (%p)...\n", globs->callback_ask_password);
result = globs->callback_ask_password (message, default_user, default_domain, NULL, flags,
&username, &password, &anonymous, &domain, &password_save,
globs->callback_data);
@@ -217,7 +217,7 @@ ask_question_cb (GMountOperation *op,
choice = -1;
if (globs->callback_ask_question) {
- fprintf (stderr, " (II) Spawning callback_ask_question (0x%.16llX)...\n", (unsigned long long) globs->callback_ask_question);
+ fprintf (stderr, " (II) Spawning callback_ask_question (%p)...\n", globs->callback_ask_question);
/* At this moment, only SFTP uses ask_question and the second button is cancellation */
globs->callback_ask_question (message, choices, &choice, 1, globs->callback_data);
fprintf (stderr, " (II) Received choice = %d\n", choice);
@@ -902,7 +902,7 @@ VFSRename (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName)
return cVFS_Failed;
}
error = NULL;
- g_file_move (src, dst, G_FILE_COPY_NONE | G_FILE_COPY_NO_FALLBACK_FOR_MOVE, NULL, NULL, NULL, &error);
+ g_file_move (src, dst, G_FILE_COPY_NO_FALLBACK_FOR_MOVE, NULL, NULL, NULL, &error);
if (error) {
g_print ("(EE) VFSRename: g_file_move() error: %s\n", error->message);
res = g_error_to_TVFSResult (error);
@@ -1300,6 +1300,7 @@ vfs_copy_progress_callback (goffset current_num_bytes,
}
}
+#define TUXCMD_DEFAULT_COPY_FLAGS G_FILE_COPY_OVERWRITE | G_FILE_COPY_NOFOLLOW_SYMLINKS | G_FILE_COPY_ALL_METADATA
TVFSResult
VFSCopyOut (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName, gboolean Append)
@@ -1331,7 +1332,7 @@ VFSCopyOut (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName,
res = cVFS_OK;
error = NULL;
- g_file_copy (src, dst, G_FILE_COPY_OVERWRITE | G_FILE_COPY_NOFOLLOW_SYMLINKS, globs->cancellable, vfs_copy_progress_callback, globs, &error);
+ g_file_copy (src, dst, TUXCMD_DEFAULT_COPY_FLAGS, globs->cancellable, vfs_copy_progress_callback, globs, &error);
if (error) {
g_print ("(EE) VFSCopyOut: g_file_copy() error: %s\n", error->message);
// res = g_error_to_TVFSResult (error);
@@ -1378,7 +1379,7 @@ VFSCopyIn (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName,
res = cVFS_OK;
error = NULL;
/* FIXME: Appending not supported */
- g_file_copy (src, dst, G_FILE_COPY_NOFOLLOW_SYMLINKS, globs->cancellable, vfs_copy_progress_callback, globs, &error);
+ g_file_copy (src, dst, TUXCMD_DEFAULT_COPY_FLAGS, globs->cancellable, vfs_copy_progress_callback, globs, &error);
if (error) {
g_print ("(EE) VFSCopyIn: g_file_copy() error: %s\n", error->message);
// res = g_error_to_TVFSResult (error);