You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/05/23 09:48:55 UTC
[05/11] camel git commit: CAMEL-11298: Minor change to file
constructor used in chmodDirectory. Should fix the issue.
CAMEL-11298: Minor change to file constructor used in chmodDirectory. Should fix the issue.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5b21c74e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5b21c74e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5b21c74e
Branch: refs/heads/camel-2.19.x
Commit: 5b21c74e4afc52de79994de3f69c8e0754764744
Parents: 69e4089
Author: Damyan Damyanov <da...@scalefocus.com>
Authored: Mon May 22 14:41:34 2017 +0300
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue May 23 11:34:04 2017 +0200
----------------------------------------------------------------------
.../camel/component/file/FileOperations.java | 30 +++++++-------------
1 file changed, 11 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5b21c74e/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java b/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
index c44c141..8a523d7 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java
@@ -16,24 +16,6 @@
*/
package org.apache.camel.component.file;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.RandomAccessFile;
-import java.io.Reader;
-import java.io.Writer;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-import java.nio.file.Files;
-import java.nio.file.attribute.PosixFilePermission;
-import java.nio.file.attribute.PosixFilePermissions;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
import org.apache.camel.Exchange;
import org.apache.camel.InvalidPayloadException;
import org.apache.camel.WrappedFile;
@@ -44,6 +26,16 @@ import org.apache.camel.util.ObjectHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import java.nio.file.Files;
+import java.nio.file.attribute.PosixFilePermission;
+import java.nio.file.attribute.PosixFilePermissions;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
/**
* File operations for {@link java.io.File}.
*/
@@ -101,7 +93,7 @@ public class FileOperations implements GenericFileOperations<File> {
// create directory one part of a time and set permissions
try {
String[] parts = dir.getPath().split("\\" + File.separatorChar);
- File base = new File(".");
+ File base = new File("");
for (String part : parts) {
File subDir = new File(base, part);
if (!subDir.exists()) {