diff --git a/ChangeLog b/ChangeLog index f5218d29e6b7760c83d2228b4901e01a5e79ac31..db555d066e8237ba91ac1d1ad7b79c49d8cfd527 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-03-16 Benedikt Meurer <benny@xfce.org> + + * thunar-vfs/thunar-vfs-xfer.c: Also chmod u+rw the target file if we + are not the owner of the source file. + * thunar-vfs/thunar-vfs-path.c(thunar_vfs_path_to_uri): Double checking + bufsize doesn't make much sense. + 2006-03-16 Benedikt Meurer <benny@xfce.org> * thunar/thunar-window.c: Add backspace as shortcut for "Back". diff --git a/thunar-vfs/thunar-vfs-path.c b/thunar-vfs/thunar-vfs-path.c index af6ded5d76cf3302928ef8a7b06e7e0058d0e508..b00cb53c2b237bdba6d08eb3ac737f5bf004b27b 100644 --- a/thunar-vfs/thunar-vfs-path.c +++ b/thunar-vfs/thunar-vfs-path.c @@ -777,7 +777,6 @@ thunar_vfs_path_to_uri (const ThunarVfsPath *path, g_return_val_if_fail (path != NULL, -1); g_return_val_if_fail (buffer != NULL, -1); - g_return_val_if_fail (bufsize > 0, -1); g_return_val_if_fail (error == NULL || *error == NULL, -1); /* verify that the buffer is large enough */ diff --git a/thunar-vfs/thunar-vfs-xfer.c b/thunar-vfs/thunar-vfs-xfer.c index e6268d0cb5832f9e23c852ec31aaf0e89e559e52..e67208735656130712ea51cf51c6d98ffeed29f2 100644 --- a/thunar-vfs/thunar-vfs-xfer.c +++ b/thunar-vfs/thunar-vfs-xfer.c @@ -283,10 +283,10 @@ thunar_vfs_xfer_copy_directory (const gchar *source_absolute_path, /* default to the source dir permissions */ mode = (source_statb->st_mode & ~S_IFMT); - /* if the source is located on a rdonly medium, we - * automatically chmod +rw the destination file. + /* if the source is located on a rdonly medium or we are not the owner of + * the source directory, we automatically chmod +rw the destination file. */ - if (tvxc_mounted_readonly (source_absolute_path)) + if (tvxc_mounted_readonly (source_absolute_path) || source_statb->st_uid != getuid ()) mode |= (THUNAR_VFS_FILE_MODE_USR_READ | THUNAR_VFS_FILE_MODE_USR_WRITE); /* check if the directory exists */ @@ -367,10 +367,10 @@ thunar_vfs_xfer_copy_regular (const gchar *source_absolute_path, /* default to the permissions of the source file */ mode = source_statb->st_mode; - /* if the source is located on a rdonly medium, we - * automatically chmod +rw the destination file. + /* if the source is located on a rdonly medium or we are not the owner + * of the source file, we automatically chmod +rw the destination file. */ - if (tvxc_mounted_readonly (source_absolute_path)) + if (tvxc_mounted_readonly (source_absolute_path) || source_statb->st_uid != getuid ()) mode |= (THUNAR_VFS_FILE_MODE_USR_READ | THUNAR_VFS_FILE_MODE_USR_WRITE); /* try to open the target file for writing */