# New Ticket Created by  Philip Taylor 
# Please include the string:  [perl #34937]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34937 >


This patch makes Parrot recognise /path/to/file and c:/path/to/file as 
absolute paths on Win32 (so that e.g. 'load_bytecode "c:/path/to/file"' 
can be used instead of 'load_bytecode "c:\\path/to/file"')

-- 
Philip Taylor
[EMAIL PROTECTED]
Index: src/library.c
===================================================================
--- src/library.c	(revision 7810)
+++ src/library.c	(working copy)
@@ -202,8 +202,10 @@
 
     /* use absolute paths as is */
 #ifdef WIN32
-    if (file_name[0] == '\\' || (isalpha(file_name[0]) &&
-                strncmp(file_name+1, ":\\", 2) == 0)) {
+    if (file_name[0] == '\\' || file_name[0] == '/' ||
+        (isalpha(file_name[0]) &&
+            (strncmp(file_name+1, ":\\", 2) == 0 ||
+             strncmp(file_name+1, ":/",  2) == 0))) {
 #else
     if (file_name[0] == '/') {
 #endif

Reply via email to