1 /* |
1 /* |
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
78 return sb.toString(); |
78 return sb.toString(); |
79 } |
79 } |
80 |
80 |
81 |
81 |
82 static String normalize(String file) { |
82 static String normalize(String file) { |
83 return file.replace('\\', '/'); |
83 file = file.replace('\\', '/'); |
|
84 if (file.length() > 2) { |
|
85 if (file.charAt(1) == ':' && file.charAt(2) == '/') { |
|
86 // convert drive letter to uppercase |
|
87 String drive = file.substring(0, 1).toUpperCase(); |
|
88 return drive + file.substring(1); |
|
89 } |
|
90 } |
|
91 return file; |
84 } |
92 } |
85 |
93 |
86 static String sep = File.separator; |
94 static String sep = File.separator; |
87 static String os = "Win32"; //System.getProperty("os.name"); |
|
88 } |
95 } |