Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XrdOss: implement proposed solution for better rename POSIX compliancy #660

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

gganis
Copy link
Member

@gganis gganis commented Mar 1, 2018

Implements enhancement #659

#endif
if (!(retc2 = lstat(local_path_New, &statbuff)))
{ if (remotefs || (statbuff.st_mode & S_IFMT) == S_IFLNK) return -EEXIST;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this means is that any symlinked FS will not allow a rename on top of an existing link. Is that what you really want? That excludes any virtualized filesystem even if local.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symlink part comes from your original comment. In my case I am mostly interested to local file, no symlinks. However, I see that the man page of rename says that

if newpath refers to a symbolic link, the link will be overwritten

So I suggest that we only leave the check on 'remotefs'. What do you think?

@abh3
Copy link
Member

abh3 commented Mar 1, 2018 via email

@gganis
Copy link
Member Author

gganis commented Mar 1, 2018

I don't have a problem of restricting destructive renames to simple
file systems as long as that's OK with you.

That's ok with me. Does it mean that the PR can stay as it is?
Gerri

@abh3
Copy link
Member

abh3 commented Mar 1, 2018 via email

@abh3 abh3 merged commit ee3fb8e into xrootd:master Mar 1, 2018
@gganis gganis deleted the Patch-For-659-Rename branch May 16, 2018 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants