@Override public boolean resolve(final Local file) throws NotfoundException, LocalAccessDeniedException { if(PreferencesFactory.get().getBoolean("local.symboliclink.resolve")) { // Follow links instead return false; } // Create symbolic link only if supported by the host if(feature != null) { final Local target = file.getSymlinkTarget(); // Only create symbolic link if target is included in the upload for(TransferItem root : files) { if(this.findTarget(target, root.local)) { if(log.isDebugEnabled()) { log.debug(String.format("Resolved target %s for %s", target, file)); } return true; } } } return false; //Follow links instead }
protected NSBundle bundle(final NSBundle main, Local executable) { if(!executable.isSymbolicLink()) { return main; } while(executable.isSymbolicLink()) { try { executable = executable.getSymlinkTarget(); } catch(NotfoundException e) { return main; } } Local folder = executable.getParent(); NSBundle b; do { b = NSBundle.bundleWithPath(folder.getAbsolute()); if(null == b) { log.error(String.format("Loading bundle %s failed", folder)); break; } if(StringUtils.equals(String.valueOf(Path.DELIMITER), b.bundlePath())) { break; } folder = folder.getParent(); } while(b.executablePath() == null); return b; } }
local.getSymlinkTarget().getAbsolute()); if(log.isDebugEnabled()) { log.debug(String.format("Create symbolic link from %s to %s", file, target));
if(!symlinkResolver.resolve(local)) { final Local target = local.getSymlinkTarget(); status.setLength(target.attributes().getSize());