summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>2005-06-16 04:43:15 -0700
committerSteve Hay <SteveHay@planit.com>2005-06-17 08:28:32 +0000
commitbe9da6a9f72474caf68c6253e58eb38c3d447728 (patch)
treef6cbba30819347ceba4b7fff8296377b5d44dcea
parent97d630600d8c80a1700f77cb16abf79250239316 (diff)
downloadperl-be9da6a9f72474caf68c6253e58eb38c3d447728.tar.gz
Strip \\?\ prefix from Perl path in win32/win32.c:set_w32_module_name()
From: "Jan Dubois" <jand@ActiveState.com> Message-Id: <200506161843.j5GIhKhL024472@smtp3.ActiveState.com> p4raw-id: //depot/perl@24880
-rw-r--r--win32/win32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 40e28f5a66..8f1a8ac67a 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -138,6 +138,10 @@ set_w32_module_name(void)
: w32_perldll_handle),
w32_module_name, sizeof(w32_module_name));
+ /* remove \\?\ prefix */
+ if (memcmp(w32_module_name, "\\\\?\\", 4) == 0)
+ memmove(w32_module_name, w32_module_name+4, strlen(w32_module_name+4)+1);
+
/* try to get full path to binary (which may be mangled when perl is
* run from a 16-bit app) */
/*PerlIO_printf(Perl_debug_log, "Before %s\n", w32_module_name);*/