Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 29765 invoked from network); 4 Jan 2002 01:06:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Jan 2002 01:06:36 -0000 Received: (qmail 22390 invoked by uid 97); 4 Jan 2002 01:06:39 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 22374 invoked by uid 97); 4 Jan 2002 01:06:38 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 22363 invoked from network); 4 Jan 2002 01:06:38 -0000 Message-ID: <3C35001A.4CB8BA7B@progress.com> Date: Thu, 03 Jan 2002 20:06:34 -0500 From: "Bill Burton" Organization: Progress Software Corporation X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en-US MIME-Version: 1.0 To: Ant Developers List Subject: Re: Refactor of PathTokenizer - am I missing something? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Jeff, I think I now have a better understanding of the problem ... Jeff Tulley wrote: > > Bill, > One thing that you are missing here is the fact that it is not a > build file directly that is triggering this problem, at least not in the > sense of the , , and tags. What is > actually giving me grief is a task that uses PathTokenizer. Okay, I didn't realize was the culprit. > It seems that I should support UNIX path names, since our OS has a > file mode that would allow you to reference our volumes in a UNIX-like > manner. (instead of sys:/temp, it would be /sys/temp, if I am not > mistaken). Okay, I didn't realize you could specify a NetWare volume with /vol/path syntax. I'm assuming that's exposed to the JVM? Here's another take at the problem. Both ";" and ":" are supported depending on whether a ";" is found anywhere in the path but not both together. Of course, the one limitation is the assumption that a filename or directory can't contain a ";": public PathTokenizer(String path) { String tokens = ":;"; // When running under NetWare, look for a ";" anywhere in the path. If not // found, assume a UNIX style path and use ":", otherwise use ";" as the // delimiter. if ( null != path && Os.isFamily("netware") ) { tokens = ( path.indexOf(';') == -1 ) ? ":" : ";"; } tokenizer = new StringTokenizer(path, tokens, false); dosStyleFilesystem = File.pathSeparatorChar == ';'; } All of the following paths should be tokenized properly: sys:/temp;sys:\public temp;public /sys/temp:/sys/public ./temp:./public Hope this helps, -Bill -- To unsubscribe, e-mail: For additional commands, e-mail: