Merge "Issue #2511 fix for edex localization adapter to allow filename to appear in path" into development
Former-commit-id:68c7d378cf
[formerly348a968aed
[formerly c2ca50713aa5e69aecdc6a5a0b04c7261305514c]] Former-commit-id:348a968aed
Former-commit-id:812f3fefce
This commit is contained in:
commit
4c311bb740
1 changed files with 8 additions and 1 deletions
|
@ -58,6 +58,8 @@ import com.raytheon.uf.edex.core.props.PropertiesFactory;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 11, 2008 1250 jelkins Initial creation
|
||||
* Mar 14, 2013 1794 djohnson FileUtil.listFiles now returns List.
|
||||
* Nov 03, 2013 2511 mnash Fix issue where if name occurs in path
|
||||
* file won't be returned correctly
|
||||
* </pre>
|
||||
*
|
||||
* @author jelkins
|
||||
|
@ -231,7 +233,12 @@ public class EDEXLocalizationAdapter implements ILocalizationAdapter {
|
|||
entry.isDirectory = file.isDirectory();
|
||||
entry.context = ctx;
|
||||
String fullPath = file.getAbsolutePath();
|
||||
entry.fileName = fullPath.substring(fullPath.indexOf(basePath));
|
||||
String path = getUtilityDir() + File.separator + ctx.toPath()
|
||||
+ File.separator;
|
||||
entry.fileName = fullPath.replaceFirst(path, "");
|
||||
if (entry.fileName.startsWith(File.separator)) {
|
||||
entry.fileName = entry.fileName.substring(1);
|
||||
}
|
||||
entry.date = new Date(file.lastModified());
|
||||
|
||||
entry.protectedLevel = ProtectedFiles.getProtectedLevel(null,
|
||||
|
|
Loading…
Add table
Reference in a new issue