Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
420fac35
Commit
420fac35
authored
May 14, 2016
by
Marc Boquet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PathList] Normalize
@root
to avoid issues with UTF8 paths
parent
20bb1ea3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
path_list.rb
lib/cocoapods/sandbox/path_list.rb
+4
-1
README
spec/fixtures/ü/README
+1
-0
path_list_spec.rb
spec/unit/sandbox/path_list_spec.rb
+7
-0
No files found.
lib/cocoapods/sandbox/path_list.rb
View file @
420fac35
require
'active_support/multibyte/unicode'
module
Pod
class
Sandbox
# The PathList class is designed to perform multiple glob matches against
...
...
@@ -20,7 +22,8 @@ module Pod
# @param [Pathname] root The root of the PathList.
#
def
initialize
(
root
)
@root
=
root
root_dir
=
ActiveSupport
::
Multibyte
::
Unicode
.
normalize
(
root
.
to_s
)
@root
=
Pathname
.
new
(
root_dir
)
@glob_cache
=
{}
end
...
...
spec/fixtures/ü/README
0 → 100644
View file @
420fac35
README
spec/unit/sandbox/path_list_spec.rb
View file @
420fac35
...
...
@@ -178,6 +178,13 @@ module Pod
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
path_list
.
files
.
should
==
%w(Classes/NSFetchedResultsController+Banana.h Classes/NSFetchRequest+Banana.h)
end
it
'supports unicode paths'
do
# Load fixture("ü") with chars ["u", "̈"] instead of ["ü"]
unicode_name
=
[
117
,
776
].
pack
(
'U*'
)
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
unicode_name
))
path_list
.
files
.
should
==
[
'README'
]
end
end
#-------------------------------------------------------------------------#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment