@Override protected void processPath(PathData src) throws IOException { processPath(src, getTargetPath(src)); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } // When a path is normalized, all trailing slashes are removed // except for the root if(!srcPath.endsWith(Path.SEPARATOR)) { srcPath += Path.SEPARATOR; } if(dstPath.startsWith(srcPath)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
dst = getTargetPath(src); final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, dst.path);
@Override protected void processPath(PathData src) throws IOException { processPath(src, getTargetPath(src)); }
@Override protected void processPath(PathData src) throws IOException { processPath(src, getTargetPath(src)); }
@Override protected void processPath(PathData src) throws IOException { processPath(src, getTargetPath(src)); }
@Override protected void processPath(PathData src) throws IOException { processPath(src, getTargetPath(src)); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } if (dstPath.startsWith(srcPath+Path.SEPARATOR)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } if (dstPath.startsWith(srcPath+Path.SEPARATOR)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } if (dstPath.startsWith(srcPath+Path.SEPARATOR)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } // When a path is normalized, all trailing slashes are removed // except for the root if(!srcPath.endsWith(Path.SEPARATOR)) { srcPath += Path.SEPARATOR; } if(dstPath.startsWith(srcPath)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
dst = getTargetPath(src); final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, dst.path);
dst = getTargetPath(src); final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, dst.path);
dst = getTargetPath(src); final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, dst.path);
dst = getTargetPath(src); final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, dst.path);