KEMBAR78
handle file and directory name include white space by fumito-ito · Pull Request #85 · groue/GRMustache.swift · GitHub
Skip to content

Conversation

@fumito-ito
Copy link
Collaborator

fixes #72 and ref: #50

Mustache.swift calls URL(string:) when constructing file path. But it causes some crashes when the file name contains white space.

Generally, URL(fileURLWithPath:) is used to solve such problems, but this API is not available in Mustache.swift because it supports iOS 9+. Therefore, encode the URL path to be added beforehand to work around the problem.

@fumito-ito fumito-ito merged commit f7b4896 into master Sep 17, 2022
@fumito-ito fumito-ito deleted the fix/contain-whitespace-file-name branch September 17, 2022 17:01
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.

Incorrect use of URL causes failure on files containing spaces.

1 participant