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(attachments:sandbox): fix the empty attachment bug on macos #20

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

Conversation

sassman
Copy link

@sassman sassman commented Apr 24, 2020

when having a sandboxed app, and using NSOpenPanel for letting users the selecting a file, the attachments did contain sizeof file times zero bytes.

Using the FileManager to access the file contents did solve the problem.

Also the base64 and cutting off after n characters is now simplified

@sassman sassman force-pushed the fix/empty-attachments branch 2 times, most recently from b258e7a to 961b2b1 Compare April 24, 2020 00:45
when having a sandboxed app, and using NSOpenPanel for letting users the selecting a file, the attachments did contain sizeof file times zero bytes.

Using the FileManager to access the file contents did solve the problem.

Also the base64 and cutting off after n characters is now simplified
@RockfordWei
Copy link
Collaborator

@sassman thanks for the PR. would you please provide some test scripts against it to prove it works, if possible?

@RockfordWei
Copy link
Collaborator

@sassman I can't build your code for these errors. Please let me know your thoughts. Thank you.

/Users/rockywei/Downloads/tmp/mactest/Perfect-SMTP/Sources/PerfectSMTP/PerfectSMTP.swift:265:2: error: source control conflict marker in source file
<<<<<<< HEAD
 ^
/Users/rockywei/Downloads/tmp/mactest/Perfect-SMTP/Sources/PerfectSMTP/PerfectSMTP.swift:251:19: error: use of unresolved identifier 'paramterRfc2231'
                        let filename = paramterRfc2231(something: file)
                                       ^~~~~~~~~~~~~~~
/Users/rockywei/Downloads/tmp/mactest/Perfect-SMTP/Sources/PerfectSMTP/PerfectSMTP.swift:252:15: error: use of unresolved identifier 'contentTypefilenameParameter'
                        let name = contentTypefilenameParameter(something: file)

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