2001-12-29 Lutz M�ller <urc8@rz.uni-karlsruhe.de>

* directory.c: Even more debugging.


git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3608 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Lutz Mueller
2001-12-29 08:50:36 +00:00
parent 7006f22f2f
commit a2cf00a3e7
2 changed files with 24 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
2001-12-29 Lutz Müller <urc8@rz.uni-karlsruhe.de>
* directory.c: Even more debugging.
2001-12-28 Lutz Müller <urc8@rz.uni-karlsruhe.de>
* directory.c: Debugging stuff, file deletion.

View File

@@ -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