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: saving ParseFiles locally do not throw error #399

Merged
merged 5 commits into from
Sep 2, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Sep 2, 2022

New Pull Request Checklist

Issue Description

Attempting to fetch or save a file locally that has a directory e.g. test/file.svg causes the Swift SDK to throw an error on the client because it attempts to create the directory structure in the filename instead of just taking the filename.

Note: This does not fix the issue of saving ParseFiles with directories in their names to the server as that issue appears to be server-side and not interpreting strict JSON.

Related issue: #n/a

Approach

Only use the file name when saving ParseFile's locally and ignore the directories as they are unnecessary.

TODOs before merging

  • Add tests
  • Reduce flakiness of LiveQuery tests by skipping some tests dynamically whenever they don't mock as connected to a live query server. When mocking connected is successful, run the full test. Whenever a test is skipped it will show in the logs
  • Add entry to changelog

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 2, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Sep 2, 2022

Codecov Report

Merging #399 (ce1a321) into main (df71568) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #399   +/-   ##
=======================================
  Coverage   89.62%   89.63%           
=======================================
  Files         158      158           
  Lines       15080    15081    +1     
=======================================
+ Hits        13516    13518    +2     
+ Misses       1564     1563    -1     
Impacted Files Coverage Δ
Sources/ParseSwift/Types/ParseFile.swift 87.54% <ø> (ø)
Sources/ParseSwift/API/API+Command.swift 89.40% <100.00%> (+0.02%) ⬆️
Sources/ParseSwift/Objects/ParseObject.swift 87.29% <0.00%> (+0.14%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cbaker6 cbaker6 merged commit 4909de3 into parse-community:main Sep 2, 2022
@cbaker6 cbaker6 deleted the fixFiles branch September 2, 2022 14:56
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

1 participant