diff options
Diffstat (limited to 'server/lib/plugins/plugin-manager.ts')
-rw-r--r-- | server/lib/plugins/plugin-manager.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts index ae05af721..ba9814383 100644 --- a/server/lib/plugins/plugin-manager.ts +++ b/server/lib/plugins/plugin-manager.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import decache from 'decache' | 1 | import decache from 'decache' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { createReadStream, createWriteStream } from 'fs' | 3 | import { createReadStream, createWriteStream } from 'fs' |
4 | import { outputFile, readJSON } from 'fs-extra' | 4 | import { ensureDir, outputFile, readJSON } from 'fs-extra' |
5 | import { basename, join } from 'path' | 5 | import { basename, join } from 'path' |
6 | import { MOAuthTokenUser, MUser } from '@server/types/models' | 6 | import { MOAuthTokenUser, MUser } from '@server/types/models' |
7 | import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' | 7 | import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' |
@@ -428,6 +428,9 @@ export class PluginManager implements ServerHook { | |||
428 | } | 428 | } |
429 | 429 | ||
430 | const { registerOptions, registerStore } = this.getRegisterHelpers(npmName, plugin) | 430 | const { registerOptions, registerStore } = this.getRegisterHelpers(npmName, plugin) |
431 | |||
432 | await ensureDir(registerOptions.peertubeHelpers.plugin.getDataDirectoryPath()) | ||
433 | |||
431 | library.register(registerOptions) | 434 | library.register(registerOptions) |
432 | .catch(err => logger.error('Cannot register plugin %s.', npmName, { err })) | 435 | .catch(err => logger.error('Cannot register plugin %s.', npmName, { err })) |
433 | 436 | ||