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