-
Notifications
You must be signed in to change notification settings - Fork 246
Introduce FileSMB for non File s2s or upload/download paths #3211
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
base: dphulkar/NFSOverRESTSupport
Are you sure you want to change the base?
Conversation
} | ||
|
||
// We can ignore the error if we fail to get the share properties. | ||
shareProtocol, _ := getShareProtocolType(ctx, serviceClient, resource, protocol) | ||
|
||
if shareProtocol == common.ELocation.File() { | ||
if isSource && fromTo.From() != common.ELocation.File() { | ||
return fmt.Errorf("The %s share has SMB protocol enabled. To copy %s a SMB share, use the appropriate --from-to flag value", direction, direction) | ||
return fmt.Errorf("The %s share has SMB protocol enabled. "+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't you just use the appropriate string in the error message here? Checking is Source above and here seems redundant
} | ||
|
||
// We can ignore the error if we fail to get the share properties. | ||
shareProtocol, _ := getShareProtocolType(ctx, serviceClient, resource, protocol) | ||
|
||
if shareProtocol == common.ELocation.File() { | ||
if isSource && fromTo.From() != common.ELocation.File() { | ||
return fmt.Errorf("The %s share has SMB protocol enabled. To copy %s a SMB share, use the appropriate --from-to flag value", direction, direction) | ||
return fmt.Errorf("The %s share has SMB protocol enabled. "+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("The %s share has SMB protocol enabled. "+ | |
return errors.New("The source share has SMB protocol enabled. "+ |
} | ||
|
||
// We can ignore the error if we fail to get the share properties. | ||
shareProtocol, _ := getShareProtocolType(ctx, serviceClient, resource, protocol) | ||
|
||
if shareProtocol == common.ELocation.File() { | ||
if isSource && fromTo.From() != common.ELocation.File() { | ||
return fmt.Errorf("The %s share has SMB protocol enabled. To copy %s a SMB share, use the appropriate --from-to flag value", direction, direction) | ||
return fmt.Errorf("The %s share has SMB protocol enabled. "+ | ||
"To copy %s a SMB share, use the appropriate --from-to flag value", location, direction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"To copy %s a SMB share, use the appropriate --from-to flag value", location, direction) | |
"To copy from a SMB share, use the appropriate --from-to flag value") |
} | ||
if !isSource && fromTo.To() != common.ELocation.File() { | ||
return fmt.Errorf("The %s share has SMB protocol enabled. To copy %s a SMB share, use the appropriate --from-to flag value", direction, direction) | ||
return fmt.Errorf("The %s share has NFS protocol enabled. "+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("The %s share has NFS protocol enabled. "+ | |
return errors.New("The destination share has NFS protocol enabled. "+ |
} | ||
if !isSource && fromTo.To() != common.ELocation.File() { | ||
return fmt.Errorf("The %s share has SMB protocol enabled. To copy %s a SMB share, use the appropriate --from-to flag value", direction, direction) | ||
return fmt.Errorf("The %s share has NFS protocol enabled. "+ | ||
"To copy %s a NFS share, use the appropriate --from-to flag value", location, direction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"To copy %s a NFS share, use the appropriate --from-to flag value", location, direction) | |
"To copy to a NFS share, use the appropriate --from-to flag value") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address my last comment, then this is good to merge
Description
Feature / Bug Fix: (Brief description of the feature or issue being addressed)
Related Links:
Issues
Team thread
Documents
[Email Subject]
Type of Change
How Has This Been Tested?
UT added
Thank you for your contribution to AzCopy!