diff options
author | Chris Wilson <chris+github@qwirx.com> | 2010-10-07 13:44:04 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2010-10-07 13:44:04 +0000 |
commit | c774d967dd5392615b5fde65177cc9f0ca0ec8fb (patch) | |
tree | 1cc1969c1b7f797a5d2d7054a4c0eb7a025ef182 /bin/bbackupquery/BackupQueries.cpp | |
parent | 7d3c64136184e5c601b4dbf9556f29a2f8aadc73 (diff) |
Finish support for -i option in bbackupquery (thanks to Achim for
noticing) (forward port to trunk).
Diffstat (limited to 'bin/bbackupquery/BackupQueries.cpp')
-rw-r--r-- | bin/bbackupquery/BackupQueries.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp index d5f31232..2278b668 100644 --- a/bin/bbackupquery/BackupQueries.cpp +++ b/bin/bbackupquery/BackupQueries.cpp @@ -455,9 +455,9 @@ QueryCommandSpecification commands[] = {CompleteRestoreRemoteDirOrId, CompleteLocalDir} }, { "help", "", Command_Help, {} }, { "usage", "m", Command_Usage, {} }, - { "undelete", "", Command_Undelete, + { "undelete", "i", Command_Undelete, {CompleteGetFileOrId} }, - { "delete", "", Command_Delete, {CompleteGetFileOrId} }, + { "delete", "i", Command_Delete, {CompleteGetFileOrId} }, { NULL, NULL, Command_Unknown, {} } }; @@ -1418,8 +1418,7 @@ void BackupQueries::CommandGetObject(const std::vector<std::string> &args, const // object ID, depending on opts['i'], where name can // include a path) and return the file ID, placing the // directory ID in *pDirIdOut and the filename part -// of the path (if not looking up by ID and not NULL) -// in *pFileNameOut. +// of the path in *pFileNameOut (if not NULL). // Created: 2008-09-12 // // -------------------------------------------------------------------------- @@ -1449,11 +1448,6 @@ int64_t BackupQueries::FindFileID(const std::string& rNameOrIdString, return 0; } } - - if(pFileNameOut) - { - *pFileNameOut = fileName; - } } BackupStoreFilenameClear fn(fileName); @@ -1516,6 +1510,12 @@ int64_t BackupQueries::FindFileID(const std::string& rNameOrIdString, *pFlagsOut = en->GetFlags(); } + if(pFileNameOut) + { + BackupStoreFilenameClear entryName(en->GetName()); + *pFileNameOut = entryName.GetClearFilename(); + } + return fileId; } |