-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Failed to symlink if file already exists #132
Comments
Regarding this vinegarhq/vinegar#322 and the change, it seems you're trying to copy We assume that users can check existence or properties of the root argument, the first argument the users give to
Therefore, if you are talking about the root folders, you should separate the check before calling If my quick view above doesn't answer your question, let me ask you some clarification questions: Given |
Look like this is not the lib issue right? This mean we need to check if the file is already exists first if not then we call For more information: |
I think you understand it right. In other words: as long as the user knows the names of what to be compared, the user should compare them by the user-side. The methods "OnXxx" are provided because some cases happening during copying must be controlled by the user even the user couldn't anticipate the names of entries which would happen the cases. Let me know if anything still unclear for you. I'm happy to hear to improve this pkg. |
Thank you for your clarification. Also thank you for your assistance. |
If i read I expected |
@apprehensions Thank you for your comment. Out discussion point is about "root" and "children". When we talk about "children" under the root, we need a basic philosophy and some options to let users control the behavior. |
Why are symlinks an exception? |
Clarification: Lines 314 to 325 in 1b0f255
|
Yes, it seems copying the source symlinks even if it's links to somewhere that does not exist. It would hr better if the symlinks gets copied to the destination regardless if it does not exist much like regular files |
I think I got your point:
Correct me if I'm understanding wrong. |
Yes, the children (destination, copy) symlink should have the same behavior as copying regular files. I apologize if I was explaining incorrectly. |
Can you please open another issue for this? |
@starzation can you confirm #145 fixes your problem? |
Like the tittle said if the file is already exists (in destination folder) it will throw 'symlink error file exists'
There already a quick patch in vinegarhq/vinegar#322, Should the patch belong here or theres?
Issue (For log and more info): vinegarhq/vinegar#321
Code: vinegarhq/vinegar/internal/dirs/copy.go
The text was updated successfully, but these errors were encountered: