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

Bug 1199836 - Don't use file:/// URL for session path #993

Merged
merged 1 commit into from Aug 31, 2015

Conversation

thebnich
Copy link
Contributor

Booboo from replacing stringByAppendingPathComponent. We want a regular absolute path URL, not a file:/// URL.

@@ -346,7 +346,7 @@ extension TabManager {

private func tabsStateArchivePath() -> String {
let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0]
return NSURL(fileURLWithPath: documentsPath).URLByAppendingPathComponent("tabsState.archive").absoluteString
return NSURL(string: documentsPath)!.URLByAppendingPathComponent("tabsState.archive").absoluteString
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is the right fix — I think you want

  return NSURL(fileURLWithPath: documentsPath).URLByAppendingPathComponent("tabsState.archive").path

@thebnich
Copy link
Contributor Author

@rnewman Both work, but I agree that it makes more sense to pull the path from a file URL than to construct an NSURL that's not actually a URL. Updated.

@rnewman
Copy link
Contributor

rnewman commented Aug 31, 2015

LGTM

thebnich added a commit that referenced this pull request Aug 31, 2015
Bug 1199836 - Don't use file:/// URL for session path
@thebnich thebnich merged commit 3c6c372 into mozilla-mobile:master Aug 31, 2015
@thebnich thebnich deleted the session-ios9 branch August 31, 2015 19:49
isabelrios pushed a commit to isabelrios/firefox-ios that referenced this pull request Feb 19, 2024
* Fixes mozilla-mobile#988: Fix failing UI tests

* Fix SettingApperanceTests (mozilla-mobile#1002)

* Fixes mozilla-mobile#999: update Carthage for AutocompleteTextField (mozilla-mobile#1000)

* Fixes mozilla-mobile#993: Update Mozilla section to include rate focus (mozilla-mobile#998)

* Fix TrackingProtectionSettings Test

* Add check for home func

* Fix WebsiteAccessTest keyboard focus error

* Stopped request for review in test mode

* Add support for Klar reviews

* Fix testDisableAutocomplete (mozilla-mobile#1004)
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

2 participants