Index: sources/storage/Settings.cpp =================================================================== diff -u -r8d5fe7d63e3d86e9d89d5f824347d34479e4e9ec -rd8c73c14f41d548e3ffecdb6948e6b7bb54523f2 --- sources/storage/Settings.cpp (.../Settings.cpp) (revision 8d5fe7d63e3d86e9d89d5f824347d34479e4e9ec) +++ sources/storage/Settings.cpp (.../Settings.cpp) (revision d8c73c14f41d548e3ffecdb6948e6b7bb54523f2) @@ -223,19 +223,26 @@ * \param vMessage * \return */ -int Settings::configurationsMove(QString *vMessage) +int Settings::configurationsMove(QString *vMessage, bool vIsUpdate) { int err = Settings_Error::eError_None ; - Location_Enum loc = Location_Enum ::eInit; - QString src = Settings::location(Location_Enum ::eInit ) ; - QString dst = Settings::location(Location_Enum ::eSecured ) ; + Location_Enum loc = Location_Enum ::eInit ; + QString src = Settings::location(Location_Enum ::eInit ); + QString dst = Settings::location(Location_Enum ::eSecured ); QString msg = ""; - if ( ! Settings ::configurationsPOST(loc )) { err = Settings_Error::eError_Remove; msg = errorMessage(err ); LOG_DEBUG(msg); goto lOut; } - if ( ! FileHandler ::makeFolder ( dst )) { err = Settings_Error::eError_Copy ; msg = errorMessage(err ); LOG_DEBUG(msg); goto lOut; } + QStringList lstExclude; + if ( vIsUpdate ) { + lstExclude << QFileInfo( src + Storage::Settings_Category_SettingsSystem ).absolutePath(); + } + + if ( ! Settings ::configurationsPOST(loc )) { err = Settings_Error::eError_Remove; msg = errorMessage(err ); LOG_DEBUG(msg); goto lOut; } + if ( ! FileHandler ::makeFolder ( dst )) { err = Settings_Error::eError_Copy ; msg = errorMessage(err ); LOG_DEBUG(msg); goto lOut; } for( QString dir : FileHandler::subFolders(src)) { QString sub = src + dir; - if ( FileHandler ::copyFolder (sub, dst )) { err = Settings_Error::eError_MkDir ; msg = errorMessage(err, dir); LOG_DEBUG(msg); goto lOut; } - if ( FileHandler ::removeFolder (sub )) { err = Settings_Error::eError_POST ; msg = errorMessage(err, dir); LOG_DEBUG(msg); goto lOut; } + if ( ! lstExclude.contains( sub ) ) { + if ( FileHandler ::copyFolder (sub, dst )) { err = Settings_Error::eError_MkDir ; msg = errorMessage(err, dir); LOG_DEBUG(msg); goto lOut; } + } + if ( FileHandler ::removeFolder (sub )) { err = Settings_Error::eError_POST ; msg = errorMessage(err, dir); LOG_DEBUG(msg); goto lOut; } } Storage::Settings_Secured();