mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 09:20:32 +01:00
fix: rimraf usage in user image delete
https://github.com/isaacs/rimraf/issues/275#issuecomment-1562402287
This commit is contained in:
@@ -208,9 +208,6 @@ module.exports = function (User) {
|
||||
|
||||
async function deleteImages(uid) {
|
||||
const folder = path.join(nconf.get('upload_path'), 'profile');
|
||||
await Promise.all([
|
||||
rimraf(path.join(folder, `${uid}-profilecover*`), { glob: true }),
|
||||
rimraf(path.join(folder, `${uid}-profileavatar*`), { glob: true }),
|
||||
]);
|
||||
await rimraf(`${uid}-profile{avatar,cover}*`, { glob: { cwd: folder } });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user