Skip to content

Commit e621dd4

Browse files
committed
Minor bug fixes
1 parent e05fbad commit e621dd4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/manage/aliasutils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ def cleanup_alias(cmd, site_dirs_written, *, _unlink_many=atomic_unlink, _scan=_
277277
for i in cmd.get_installs():
278278
expected.update(a.get("name", "").casefold() for a in i.get("alias", ()))
279279

280+
if expected:
281+
expected.add("python".casefold())
282+
expected.add("pythonw".casefold())
283+
280284
for i, s in site_dirs_written or ():
281285
for alias, code in _scan(i["prefix"], s.get("dirs")):
282286
expected.add(alias.get("name", "").casefold())

src/pymanager/launcher.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ insert_script(int *argc, wchar_t ***argv)
192192
return HRESULT_FROM_WIN32(error);
193193
}
194194
}
195-
CloseHandle(fh);
195+
FindClose(fh);
196196

197197
// Create a new argv that will be used to launch the script.
198198
wchar_t **argv2 = (wchar_t **)HeapAlloc(ph, HEAP_ZERO_MEMORY, sizeof(wchar_t *) * (*argc + 1));
@@ -209,6 +209,7 @@ insert_script(int *argc, wchar_t ***argv)
209209
argv2[i + 1] = (*argv)[i];
210210
}
211211
*argv = argv2;
212+
*argc += 1;
212213
return 0;
213214
}
214215

0 commit comments

Comments
 (0)