>>>>> "TH" == Thomas Haas <[EMAIL PROTECTED]> writes:
>> You could simply call translatePath for single >> filenames as
>> well, couldn't you?
TH> translatePath returns a list of Strings, whereas translateFile
TH> returns a single String and does not mess with path separators.
So just use the first one? Maybe
public static String translateFile(String source) {
if (source == null || source.length() == 0) return "";
return (String) translatePath(source).elementAt(0);
}
instead of duplicating the / \ replacement. "Once And Only Once" to
cite an XP mantra - that I wouldn't follow religously of course.
Either source doesn't include a PathSeparator or it's a : on DOS based
systems (forgot OS/2 in my list) or we are in trouble anyway.
Stefan