[
https://issues.apache.org/jira/browse/HDFS-7162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156180#comment-14156180
]
Chengbing Liu commented on HDFS-7162:
-------------------------------------
I think there are some misunderstandings, probably due to the title is not
quite clear. So let me clarify what the patch actually does.
Two problems are fixed in HDFS-7162.2.patch:
- Say we want to delete the file {{/path/to/file}}, and somehow the file
{{/user/yourname/.Trash/Current/path/to/file}} exists, we expect the file to be
moved as {{/user/yourname/.Trash/Current/path/to/file.1}}. The actual thing it
did was moving the file to {{/user/yourname/.Trash/Current/path/tofile.1}},
where a slash is missing.
- When judging if the file to be deleted ({{abs_path}}) is already in the
trash, we compare the {{trash_base}} with {{abs_path}}. The problem is exactly
as Colin has pointed out. But I don't think we could just add a slash to the
end of {{trash_base}}, since the given {{abs_path}} can end with
{{/user/yourname/.Trash/Current}} with no slash at the end. In this case,
adding a slash to the end of {{trash_base}} would not delete the whold
{{/user/yourname/.Trash/Current}} directory.
> Wrong path when deleting through fuse-dfs a file which already exists in trash
> ------------------------------------------------------------------------------
>
> Key: HDFS-7162
> URL: https://issues.apache.org/jira/browse/HDFS-7162
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: fuse-dfs
> Affects Versions: 3.0.0, 2.5.1
> Reporter: Chengbing Liu
> Assignee: Chengbing Liu
> Attachments: HDFS-7162.2.patch, HDFS-7162.patch
>
>
> HDFS-4913 lacks a slash in renaming existing trash file. Very small fix for
> this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)