HDFS-12212. Options.Rename.To_TRASH is considered even when Options.Rename.NONE is specified. Contributed by Vinayakumar B.

This commit is contained in:
Ayush Saxena 2019-08-30 08:40:13 +05:30
parent 915271245b
commit e220dac15c

View File

@ -669,7 +669,7 @@ public Rename2ResponseProto rename2(RpcController controller,
ArrayList<Rename> optionList = new ArrayList<Rename>();
if(req.getOverwriteDest()) {
optionList.add(Rename.OVERWRITE);
} else if(req.hasMoveToTrash()) {
} else if(req.hasMoveToTrash() && req.getMoveToTrash()) {
optionList.add(Rename.TO_TRASH);
}