File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1190,9 +1190,10 @@ public Path getTrashRoot(Path path) {
11901190 // targetFSTrashRootPath is the default trash root based on user home
11911191 // dir.
11921192 Path defaultUserHome = res .targetFileSystem .getHomeDirectory ();
1193- if ((mountTargetPath == null || ROOT_PATH .equals (mountTargetPath ))
1194- && defaultUserHome != null && targetFSTrashRootPath .equals (
1195- new Path (defaultUserHome , TRASH_PREFIX ))) {
1193+ if ((mountTargetPath == null || mountTargetPath .isEmpty ()
1194+ || ROOT_PATH .equals (mountTargetPath )) && defaultUserHome != null
1195+ && targetFSTrashRootPath .equals (
1196+ defaultUserHome .toUri ().getPath () + "/" + TRASH_PREFIX )) {
11961197 return makeQualified (new Path (res .resolvedPath ,
11971198 TRASH_PREFIX + "/" + ugi .getShortUserName ()));
11981199 } else {
You can’t perform that action at this time.
0 commit comments