HDFS-12212. Options.Rename.To_TRASH is considered even when Options.Rename.NONE is specified. Contributed by Vinayakumar B.
This commit is contained in:
parent
915271245b
commit
e220dac15c
@ -669,7 +669,7 @@ public Rename2ResponseProto rename2(RpcController controller,
|
|||||||
ArrayList<Rename> optionList = new ArrayList<Rename>();
|
ArrayList<Rename> optionList = new ArrayList<Rename>();
|
||||||
if(req.getOverwriteDest()) {
|
if(req.getOverwriteDest()) {
|
||||||
optionList.add(Rename.OVERWRITE);
|
optionList.add(Rename.OVERWRITE);
|
||||||
} else if(req.hasMoveToTrash()) {
|
} else if(req.hasMoveToTrash() && req.getMoveToTrash()) {
|
||||||
optionList.add(Rename.TO_TRASH);
|
optionList.add(Rename.TO_TRASH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user