Changeset 6151 in josm for trunk/src/org/openstreetmap/josm/gui/preferences
- Timestamp:
- 2013-08-16T10:13:47+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java
r6148 r6151 159 159 /** 160 160 * Returns the parent directory of the resource inside the zip file. 161 * @return null, if zipEntryPath is null, otherwise the parent directory of162 * the resource inside the zip file161 * @return the parent directory of the resource inside the zip file, 162 * "." if zipEntryPath is a top level file; null, if zipEntryPath is null 163 163 */ 164 164 public String getZipEntryDirName() { 165 165 if (zipEntryPath == null) return null; 166 return new File(zipEntryPath).getParent().toString(); 166 File file = new File(zipEntryPath); 167 File dir = file.getParentFile(); 168 if (dir == null) return "."; 169 return dir.getPath(); 167 170 } 168 171 }
Note:
See TracChangeset
for help on using the changeset viewer.