Skip to content

Commit f59afa9

Browse files
committed
Change folder permission reset to reset the correct folder
1 parent 33c31f4 commit f59afa9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Installer.cpp

+6-6
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()
@@ -262,7 +262,7 @@ HRESULT NppShell::Installer::UnregisterSparsePackage()
262262
}
263263

264264
// After unregistering the sparse package, we reset the folder permissions of the folder where we are installed.
265-
ResetAclPermissionsOnApplicationFolder();
265+
ResetAclPermissionsOnContextMenuFolder();
266266

267267
return S_OK;
268268
}

0 commit comments

Comments
 (0)