|
From: SourceForge.net <no...@so...> - 2003-11-06 21:25:08
|
Bugs item #837258, was opened at 2003-11-06 10:27 Message generated for change (Settings changed) made by spestov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=837258&group_id=588 Category: editor core Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nicholas O'Leary (olearyni) Assigned to: Nobody/Anonymous (nobody) Summary: MiscUtilities handling of file extensions Initial Comment: There are a couple methods in MiscUtilities that deal with file extensions that will give incorrect results in certain situations. .getFileNameExtension(name) will return incorrect results if the path includes a '.' For example, given: C:\Program Files\jEdit 4.2pre6 \jars\ShortcutSaver\shortcutSaver\ActionUtils.java the result is: .2pre6\jars\ShortcutSaver\shortcutSaver\ActionUtils.java The correct action should be to first call MiscUtilities.getFileName() to strip off the path information. Then the extension should be obtained from the first instance of '.'. This will handle .tar.gz style extensions. Secondly, .getFileNameNoExtensions() will fail in the '.tar.gz' instance, as it will only strip off the '.gz'. As such, it should again first call getFileName(), cut at the first '.' and then reappend this to the result of 'getParentPath()'. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=837258&group_id=588 |