diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-04-20 22:03:09 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-04-20 22:03:09 +0000 |
commit | c585fec3d8c28c82892ecf0c802d86f712e35603 (patch) | |
tree | 59a8e03974b8411280acf3afb618597778a8cae3 | |
parent | 95b988a17f61ca456bf53f24daa8c45aad2ddfb1 (diff) |
Add a warning that comparing locations with a final directory separator
may fail (Stefan Tauner) (refs #3, merges [1512])
-rw-r--r-- | bin/bbackupquery/BackupQueries.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp index 7ab23441..0e4a7cd1 100644 --- a/bin/bbackupquery/BackupQueries.cpp +++ b/bin/bbackupquery/BackupQueries.cpp @@ -1229,6 +1229,19 @@ void BackupQueries::CompareLocation(const std::string &rLocation, BackupQueries: return; } const Configuration &loc(locations.GetSubConfiguration(rLocation.c_str())); + + #ifdef WIN32 + { + std::string path = loc.GetKeyValue("Path"); + if (path.size() > 0 && path[path.size()-1] == + DIRECTORY_SEPARATOR_ASCHAR) + { + fprintf(stderr, "Warning: location '%s' path ends " + "with '%s', compare may fail!", + rLocation, DIRECTORY_SEPARATOR); + } + } + #endif try { |