mirror of https://github.com/vitalif/zbackup
Respect options on storage initialization
parent
aaffa344d2
commit
a04128961a
|
@ -505,7 +505,8 @@ invalid_option:
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
ZBackup::initStorage( args[ 1 ], passwords[ 0 ], !passwords[ 0 ].empty() );
|
||||
ZBackup::initStorage( args[ 1 ],
|
||||
passwords[ 0 ], !passwords[ 0 ].empty(), config );
|
||||
}
|
||||
else
|
||||
if ( strcmp( args[ 0 ], "backup" ) == 0 )
|
||||
|
|
|
@ -180,12 +180,14 @@ ExtendedStorageInfo ZBackupBase::loadExtendedStorageInfo(
|
|||
|
||||
void ZBackupBase::initStorage( string const & storageDir,
|
||||
string const & password,
|
||||
bool isEncrypted )
|
||||
bool isEncrypted,
|
||||
Config const & configIn )
|
||||
{
|
||||
StorageInfo storageInfo;
|
||||
ExtendedStorageInfo extendedStorageInfo;
|
||||
Config config( extendedStorageInfo.mutable_config() );
|
||||
config.reset_storable();
|
||||
config.storable->MergeFrom( *configIn.storable );
|
||||
|
||||
EncryptionKey encryptionkey = EncryptionKey::noKey();
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
/// Creates new storage
|
||||
static void initStorage( std::string const & storageDir, std::string const & password,
|
||||
bool isEncrypted );
|
||||
bool isEncrypted, Config const & );
|
||||
|
||||
/// For a given file within the backups/ dir in the storage, returns its
|
||||
/// storage dir or throws an exception
|
||||
|
|
Loading…
Reference in New Issue