Author: tchemit Date: 2008-02-20 23:35:31 +0000 (Wed, 20 Feb 2008) New Revision: 1164 Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java Log: fix bug : if not ending / on data directory, miss it :) now attachment export works :) Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java 2008-02-20 23:28:38 UTC (rev 1163) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java 2008-02-20 23:35:31 UTC (rev 1164) @@ -64,11 +64,13 @@ */ private File getFile(MetaData entity, Attachment attachment, boolean createDir) { StringBuffer resultPath = new StringBuffer(baseFolder); - + String separator = File.separator; + if (!baseFolder.endsWith(separator)) { + resultPath.append(separator); + } String uuid = entity.getUuid(); // Create file path - String separator = File.separator; if (uuid.length() > 3) { resultPath.append(uuid.substring(0, 1)).append(separator).append(uuid.substring(1, 2)).append(separator) .append(uuid.substring(2, 3)).append(separator).append(uuid);
participants (1)
-
tchemit@users.labs.libre-entreprise.org