X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fdecache.ts;h=6be446ff64211455eec5c7ae291b3309821948a6;hb=07880c3642ca9fd9363850cf1a8e3cd2c6d9cd59;hp=08ab545e42aab664d479bdf87163467f98cbc74d;hpb=3a380e9a71037b0fcbace58a7599221e7cc76e20;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/decache.ts b/server/helpers/decache.ts index 08ab545e4..6be446ff6 100644 --- a/server/helpers/decache.ts +++ b/server/helpers/decache.ts @@ -3,16 +3,16 @@ import { extname } from 'path' -function decachePlugin (pluginPath: string, libraryPath: string) { +function decachePlugin (libraryPath: string) { const moduleName = find(libraryPath) if (!moduleName) return searchCache(moduleName, function (mod) { delete require.cache[mod.id] - }) - removeCachedPath(pluginPath) + removeCachedPath(mod.path) + }) } function decacheModule (name: string) { @@ -22,9 +22,9 @@ function decacheModule (name: string) { searchCache(moduleName, function (mod) { delete require.cache[mod.id] - }) - removeCachedPath(moduleName) + removeCachedPath(mod.path) + }) } // ---------------------------------------------------------------------------