[coldsync commit] r2595 - trunk/src

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 14, 2008, 3:52:28 AM10/14/08
to coldsync...@googlegroups.com
Author: azummo...@towertech.it
Date: Tue Oct 14 00:51:35 2008
New Revision: 2595

Modified:
trunk/src/restore.c

Log:
Avoid uploading databases with zero creato/type


Modified: trunk/src/restore.c
==============================================================================
--- trunk/src/restore.c (original)
+++ trunk/src/restore.c Tue Oct 14 00:51:35 2008
@@ -71,6 +71,17 @@
return False;
}

+ /* Zeroed type/creator will cause troubles when reading the
+ * database list
+ */
+
+ if (pdb->type == 0x00 || pdb->creator == 0x00)
+ {
+ SYNC_TRACE(6)
+ fprintf(stderr, " creator/type is zero!\n");
+ return False;
+ }
+
dbinfo = palm_find_dbentry(palm, pdb->name);
if (dbinfo == NULL)
{
@@ -110,7 +121,7 @@
if (pdb->type != dbinfo->type || pdb->creator != dbinfo->creator)
{
SYNC_TRACE(6)
- fprintf(stderr, "creator/type mismatch\n");
+ fprintf(stderr, " creator/type mismatch\n");
return False;
}

@@ -154,6 +165,7 @@
{
SYNC_TRACE(4)
fprintf(stderr, "database is not restorable\n");
+ Error(_("%s cannot be restored."), fname);
va_add_to_log(pconn, "%s %s - %s\n",
_("Restore"), pdb->name, _("Not restorable"));
return 0;

Reply all
Reply to author
Forward
0 new messages