From a2cf00a3e723f744f2f938df0aabf55304716e1e Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Sat, 29 Dec 2001 08:50:36 +0000 Subject: [PATCH] =?UTF-8?q?2001-12-29=20=20Lutz=20M=EF=BF=BDller=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * directory.c: Even more debugging. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3608 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/directory/ChangeLog | 4 ++++ camlibs/directory/directory.c | 23 ++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/camlibs/directory/ChangeLog b/camlibs/directory/ChangeLog index ad2c49de9..b1aacfa01 100644 --- a/camlibs/directory/ChangeLog +++ b/camlibs/directory/ChangeLog @@ -1,3 +1,7 @@ +2001-12-29 Lutz Müller + + * directory.c: Even more debugging. + 2001-12-28 Lutz Müller * directory.c: Debugging stuff, file deletion. diff --git a/camlibs/directory/directory.c b/camlibs/directory/directory.c index e55a856f0..df8cc26ea 100644 --- a/camlibs/directory/directory.c +++ b/camlibs/directory/directory.c @@ -358,8 +358,8 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, return (result); #ifdef DEBUG - for (i = 0; i < 1000; i++) { - result = gp_file_progress (file, (float) i / 1000.); + for (i = 0; i < 500; i++) { + result = gp_file_progress (file, (float) i / 500.); if (result < 0) return (result); usleep (10); @@ -487,6 +487,10 @@ put_file_func (CameraFilesystem *fs, const char *folder, { char path[2048]; const char *name; + int result; +#ifdef DEBUG + unsigned int i; +#endif gp_file_get_name (file, &name); @@ -495,7 +499,20 @@ put_file_func (CameraFilesystem *fs, const char *folder, strncat (path, "/", sizeof (path)); strncat (path, name, sizeof (path)); - return (gp_file_save (file, path)); + result = gp_file_save (file, path); + if (result < 0) + return (result); + +#ifdef DEBUG + for (i = 0; i < 500; i++) { + result = gp_file_progress (file, (float) i / 500.); + if (result < 0) + return (result); + usleep (10); + } +#endif + + return (GP_OK); } int