diff --git a/ChangeLog.txt b/ChangeLog.txt index 7bd093b5..74445b20 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,7 @@ Version 0.10.1 (unreleased) --------------- Fixed bugs: * If file system migration encounters files or folders with the wrong format in the base directory, it now just ignores them instead of crashing. +* When trying to migrate a file system from CryFS 0.9.3 or older, show an error message suggesting to first open it with 0.9.10 because we can't load that anymore. Version 0.10.0 diff --git a/src/cryfs/impl/config/CryConfigLoader.cpp b/src/cryfs/impl/config/CryConfigLoader.cpp index 5cd8b80d..f1acd5d4 100644 --- a/src/cryfs/impl/config/CryConfigLoader.cpp +++ b/src/cryfs/impl/config/CryConfigLoader.cpp @@ -43,12 +43,6 @@ optional CryConfigLoader::_loadConfig(bf::pat } #endif _checkVersion(*config.right()->config(), allowFilesystemUpgrade); -#ifndef CRYFS_NO_COMPATIBILITY - //Since 0.9.3-alpha set the config value cryfs.blocksizeBytes wrongly to 32768 (but didn't use the value), we have to fix this here. - if (config.right()->config()->Version() != "0+unknown" && VersionCompare::isOlderThan(config.right()->config()->Version(), "0.9.3-rc1")) { - config.right()->config()->SetBlocksizeBytes(32832); - } -#endif if (config.right()->config()->Version() != CryConfig::FilesystemFormatVersion) { config.right()->config()->SetVersion(CryConfig::FilesystemFormatVersion); config.right()->save(); @@ -65,6 +59,9 @@ optional CryConfigLoader::_loadConfig(bf::pat } void CryConfigLoader::_checkVersion(const CryConfig &config, bool allowFilesystemUpgrade) { + if (gitversion::VersionCompare::isOlderThan(config.Version(), "0.9.4")) { + throw CryfsException("This filesystem is for CryFS " + config.Version() + ". This format is not supported anymore. Please migrate the file system to a supported version first by opening it with CryFS 0.9.x (x>=4).", ErrorCode::TooOldFilesystemFormat); + } if (gitversion::VersionCompare::isOlderThan(CryConfig::FilesystemFormatVersion, config.Version())) { if (!_console->askYesNo("This filesystem is for CryFS " + config.Version() + " or later and should not be opened with older versions. It is strongly recommended to update your CryFS version. However, if you have backed up your base directory and know what you're doing, you can continue trying to load it. Do you want to continue?", false)) { throw CryfsException("This filesystem is for CryFS " + config.Version() + " or later. Please update your CryFS version.", ErrorCode::TooNewFilesystemFormat);