mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: closes #13219, only delete local user folder
This commit is contained in:
@@ -234,7 +234,9 @@ module.exports = function (User) {
|
||||
}
|
||||
|
||||
async function deleteImages(uid) {
|
||||
const folder = path.join(nconf.get('upload_path'), 'profile', `uid-${uid}`);
|
||||
await rimraf(folder);
|
||||
if (utils.isNumber(uid)) {
|
||||
const folder = path.join(nconf.get('upload_path'), 'profile', `uid-${uid}`);
|
||||
await rimraf(folder);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user