From 2f4b218f6fb7e4da41c6f076dcbe923d3d8c2749 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 27 Mar 2020 14:49:11 +0100 Subject: [PATCH] Delete visbility file (if any) when deleting user account image --- src/helpers/AccountImageHelper.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers/AccountImageHelper.ts b/src/helpers/AccountImageHelper.ts index 66774aa..7062748 100644 --- a/src/helpers/AccountImageHelper.ts +++ b/src/helpers/AccountImageHelper.ts @@ -53,7 +53,10 @@ export class AccountImageHelper { // Delete meta file unlinkSync(this.GetPathMetadataFile(userID)); - // TODO : delete visiblity file (if any) + // Delete visiblity file (if any) + const visibilityFile = this.GetPathVisibilityFile(userID); + if(existsSync(visibilityFile)) + unlinkSync(visibilityFile); } }