mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Removed Roon related importer code
no issue - The support for the misformated roon imports was temporary anyway, based on the comments in code. It's also unecessary to keep around any code related to Roon as it's been _ages_ since anybody needed this kind of migration
This commit is contained in:
parent
169fa83781
commit
16e0736379
@ -21,7 +21,6 @@ const messages = {
|
||||
error: 'Import could not clean up file ',
|
||||
context: 'Your site will continue to work as expected'
|
||||
},
|
||||
unsupportedRoonExport: 'Your zip file looks like an old format Roon export, please re-export your Roon blog and try again.',
|
||||
noContentToImport: 'Zip did not include any content to import.',
|
||||
invalidZipStructure: 'Invalid zip file structure.',
|
||||
invalidZipFileBaseDirectory: 'Invalid zip file: base directory read failed',
|
||||
@ -160,14 +159,6 @@ class ImportManager {
|
||||
this.getDirectoryGlob(this.getDirectories(), ROOT_OR_SINGLE_DIR), {cwd: directory}
|
||||
);
|
||||
|
||||
const oldRoonMatches = glob.sync(this.getDirectoryGlob(['drafts', 'published', 'deleted'], ROOT_OR_SINGLE_DIR),
|
||||
{cwd: directory});
|
||||
|
||||
// This is a temporary extra message for the old format roon export which doesn't work with Ghost
|
||||
if (oldRoonMatches.length > 0) {
|
||||
throw new errors.UnsupportedMediaTypeError({message: tpl(messages.unsupportedRoonExport)});
|
||||
}
|
||||
|
||||
// If this folder contains importable files or a content or images directory
|
||||
if (extMatchesBase.length > 0 || (dirMatches.length > 0 && extMatchesAll.length > 0)) {
|
||||
return true;
|
||||
|
@ -183,16 +183,6 @@ describe('Importer', function () {
|
||||
|
||||
ImportManager.isValidZip.bind(ImportManager, testDir).should.throw(errors.UnsupportedMediaTypeError);
|
||||
});
|
||||
|
||||
it('shows a special error for old Roon exports', function () {
|
||||
const testDir = path.resolve('test/utils/fixtures/import/zips/zip-old-roon-export');
|
||||
|
||||
const msg = 'Your zip file looks like an old format Roon export, ' +
|
||||
'please re-export your Roon blog and try again.';
|
||||
|
||||
ImportManager.isValidZip.bind(ImportManager, testDir).should.throw(errors.UnsupportedMediaTypeError);
|
||||
ImportManager.isValidZip.bind(ImportManager, testDir).should.throw(msg);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Get Base Dir', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user