Skip to content

Commit 37f43ac

Browse files
committed
Change folder permission reset to reset the correct folder
1 parent 49df617 commit 37f43ac

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Installer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,16 @@ HRESULT MoveFileToTempAndScheduleDeletion(const wstring& filePath, bool moveToTe
167167
return S_OK;
168168
}
169169

170-
void ResetAclPermissionsOnApplicationFolder()
170+
void ResetAclPermissionsOnContextMenuFolder()
171171
{
172-
// First we get the path where Notepad++ is installed.
173-
const wstring applicationPath = GetApplicationPath();
172+
// First we get the path where Notepad++ context menu is installed.
173+
const wstring contextMenuPath = GetContextMenuPath();
174174

175175
// Create a new AclHelper
176176
AclHelper aclHelper;
177177

178-
// Reset the ACL of the folder where Notepad++ is installed.
179-
aclHelper.ResetAcl(applicationPath);
178+
// Reset the ACL of the folder where Notepad++ context menu is installed.
179+
aclHelper.ResetAcl(contextMenuPath);
180180
}
181181

182182
Package GetSparsePackage(bool allUsers)
@@ -314,7 +314,7 @@ HRESULT NppShell::Installer::UnregisterSparsePackage()
314314
}
315315

316316
// After unregistering the sparse package, we reset the folder permissions of the folder where we are installed.
317-
ResetAclPermissionsOnApplicationFolder();
317+
ResetAclPermissionsOnContextMenuFolder();
318318

319319
return S_OK;
320320
}

0 commit comments

Comments
 (0)