# HG changeset patch # User masneyb # Date 1095901472 0 # Node ID 1ce11a3d95578d1bb406ba9e4ab7d3185d5082f5 # Parent b497d05cb5910f3b9bc66a18a5f2a363cd0c0d48 2004-9-22 Brian Masney * lib/options.h src/uicommon/gftpui.c - added option to preserve the file time. In the past, it would save the file time if saving the file permissions was enabled. diff -r b497d05cb591 -r 1ce11a3d9557 ChangeLog --- a/ChangeLog Wed Sep 22 23:38:53 2004 +0000 +++ b/ChangeLog Thu Sep 23 01:04:32 2004 +0000 @@ -1,4 +1,8 @@ 2004-9-22 Brian Masney + * lib/options.h src/uicommon/gftpui.c - added option to preserve the + file time. In the past, it would save the file time if saving the file + permissions was enabled. + * src/gtk/transfer.c (check_done_process) - if the process returned an error code, then remove the file and don't prompt the user to upload the file if it was changed @@ -2842,7 +2846,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.324 2004/09/22 23:38:53 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.325 2004/09/23 01:04:32 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r b497d05cb591 -r 1ce11a3d9557 lib/options.h --- a/lib/options.h Wed Sep 22 23:38:53 2004 +0000 +++ b/lib/options.h Thu Sep 23 01:04:32 2004 +0000 @@ -76,6 +76,11 @@ GFTP_CVARS_FLAGS_SHOW_BOOKMARK, N_("Preserve file permissions of transfered files"), GFTP_PORT_ALL, NULL}, + {"preserve_time", N_("Preserve file time"), + gftp_option_type_checkbox, GINT_TO_POINTER(1), NULL, + GFTP_CVARS_FLAGS_SHOW_BOOKMARK, + N_("Preserve file times of transfered files"), GFTP_PORT_ALL, + NULL}, {"refresh_files", N_("Refresh after each file transfer"), gftp_option_type_checkbox, GINT_TO_POINTER(0), NULL, GFTP_CVARS_FLAGS_SHOW_BOOKMARK, diff -r b497d05cb591 -r 1ce11a3d9557 src/uicommon/gftpui.c --- a/src/uicommon/gftpui.c Wed Sep 22 23:38:53 2004 +0000 +++ b/src/uicommon/gftpui.c Thu Sep 23 01:04:32 2004 +0000 @@ -1276,7 +1276,7 @@ int gftpui_common_transfer_files (gftp_transfer * tdata) { - intptr_t preserve_permissions, trans_blksize; + intptr_t preserve_permissions, preserve_time, trans_blksize; struct timeval updatetime; ssize_t num_read, ret; gftp_file * curfle; @@ -1464,14 +1464,16 @@ gftp_lookup_request_option (tdata->fromreq, "preserve_permissions", &preserve_permissions); + gftp_lookup_request_option (tdata->fromreq, "preserve_time", + &preserve_time); - if (!curfle->is_fd && preserve_permissions) + if (!curfle->is_fd) { - if (curfle->st_mode != 0) + if (preserve_permissions && curfle->st_mode != 0) gftp_chmod (tdata->toreq, curfle->destfile, curfle->st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)); - if (curfle->datetime != 0) + if (preserve_time && curfle->datetime != 0) gftp_set_file_time (tdata->toreq, curfle->destfile, curfle->datetime); }