summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-12-16 16:12:35 +0000
committerChris Wilson <chris+github@qwirx.com>2006-12-16 16:12:35 +0000
commit86300ca399680282c05bdccf1cf2830bea1f49d7 (patch)
tree1b1eda86830cded11153baef25145c3f601166eb
parent9c799b67a6ce53b0d999c280915e8a618ae04756 (diff)
Improved debugging when a path to a location doesn't exist or can't be
opened. (refs #3)
-rw-r--r--bin/bbackupd/BackupDaemon.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index 4f9c9274..87955fa4 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -1562,8 +1562,19 @@ TRACE0("new location\n");
// First, get the directory's attributes and modification time
box_time_t attrModTime = 0;
BackupClientFileAttributes attr;
- attr.ReadAttributes(ploc->mPath.c_str(), true /* directories have zero mod times */,
- 0 /* not interested in mod time */, &attrModTime /* get the attribute modification time */);
+ try
+ {
+ attr.ReadAttributes(ploc->mPath.c_str(),
+ true /* directories have zero mod times */,
+ 0 /* not interested in mod time */,
+ &attrModTime /* get the attribute modification time */);
+ }
+ catch (BoxException &e)
+ {
+ ::syslog(LOG_ERR, "Failed to get attributes for path "
+ "'%s', skipping.", ploc->mPath.c_str());
+ continue;
+ }
// Execute create directory command
MemBlockStream attrStream(attr);
@@ -1587,6 +1598,8 @@ TRACE0("new location\n");
{
delete ploc;
ploc = 0;
+ ::syslog(LOG_ERR, "Failed to setup location '%s' path '%s'",
+ ploc->mName.c_str(), ploc->mPath.c_str());
throw;
}
}