Browse Source

Add support for extracting names from Volumes on NetWare.

Submitted by: "Jeff Tulley" <JTULLEY@novell.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269789 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
84ca9ada49
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      src/main/org/apache/tools/tar/TarEntry.java

+ 9
- 3
src/main/org/apache/tools/tar/TarEntry.java View File

@@ -206,10 +206,10 @@ public class TarEntry implements TarConstants {
// Strip off drive letters! // Strip off drive letters!
// REVIEW Would a better check be "(File.separator == '\')"? // REVIEW Would a better check be "(File.separator == '\')"?
String Win32Prefix = "Windows";
String prefix = osname.substring(0, Win32Prefix.length());
String win32Prefix = "Windows";
String prefix = osname.substring(0, win32Prefix.length());
if (prefix.equalsIgnoreCase(Win32Prefix)) {
if (prefix.equalsIgnoreCase(win32Prefix)) {
if (name.length() > 2) { if (name.length() > 2) {
char ch1 = name.charAt(0); char ch1 = name.charAt(0);
char ch2 = name.charAt(1); char ch2 = name.charAt(1);
@@ -221,6 +221,12 @@ public class TarEntry implements TarConstants {
} }
} }
} }
else if (osname.toLowerCase().indexOf("netware") > -1) {
int colon = name.indexOf(':');
if (colon != -1) {
name=name.substring(colon+1);
}
}
} }
name = name.replace(File.separatorChar, '/'); name = name.replace(File.separatorChar, '/');


Loading…
Cancel
Save