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

Fix error when uploading files from ios gallery to a share with recycle #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pokyunn
Copy link

@pokyunn pokyunn commented Aug 23, 2024

  • add variable to define default vfs objects
  • add new fruit: options
  • add catia object
  • change condition to only include recycle when set to yes

When "vfs objects" is called inside a share block it overrides what's in global instead of merging them.

https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#VFSOBJECTS https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X

- add variable to define default vfs objects
- add new fruit: options
- add catia object
- change condition to only include recycle when set to yes

When "vfs objects" is called inside a share block it overrides what's in global instead of merging them.

https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#VFSOBJECTS
https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X
@pokyunn pokyunn requested a review from crazy-max as a code owner August 23, 2024 00:25
@@ -185,8 +194,8 @@ if [[ "$(yq --output-format=json e '(.. | select(tag == "!!str")) |= envsubst' "
if [[ "$(_jq '.hidefiles')" != "null" ]] && [[ -n "$(_jq '.hidefiles')" ]]; then
echo "hide files = $(_jq '.hidefiles')" >> /etc/samba/smb.conf
fi
if [[ "$(_jq '.recycle')" != "null" ]] && [[ -n "$(_jq '.recycle')" ]]; then
echo "vfs objects = recycle" >> /etc/samba/smb.conf
if [[ -n "$(_jq '.recycle')" ]] && [[ "$(_jq '.recycle')" == "yes" ]]; then
Copy link
Owner

Choose a reason for hiding this comment

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

I think you need to check nullable first:

Suggested change
if [[ -n "$(_jq '.recycle')" ]] && [[ "$(_jq '.recycle')" == "yes" ]]; then
if [[ "$(_jq '.recycle')" != "null" ]] && [[ "$(_jq '.recycle')" = "yes" ]]; then

similar to https://github.com/crazy-max/docker-samba/pull/116/files#diff-4ba17048e76227dbde3fbc98302d14f92284e27360ac7ff1f5230740c79cf2fdR190

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.

2 participants