Skip to content

Commit

Permalink
normalize slashed on uri like pathes
Browse files Browse the repository at this point in the history
on windows it can happen that the uri lioke paths has a mixture
of / and \ file separator BUT the uri needs to have only /

maybe fixes #2005
  • Loading branch information
mkristian committed Jun 18, 2015
1 parent 7f1739b commit c36be6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/util/URLResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ public static FileResource create(Ruby runtime, String pathname)
if (!pathname.startsWith(URI)) {
return null;
}
pathname = pathname.substring(URI.length());
// GH-2005 needs the replace
pathname = pathname.substring(URI.length()).replace("\\", "/");
if (pathname.startsWith(CLASSLOADER)) {
return createClassloaderURI(runtime, pathname.substring(CLASSLOADER.length()));
}
Expand Down

0 comments on commit c36be6b

Please sign in to comment.