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
2cb671fa
Commit
2cb671fa
authored
Apr 03, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid “creating” the same directory over & over
parent
0d2d7718
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
target_installer.rb
...nstaller/xcode/pods_project_generator/target_installer.rb
+1
-1
headers_store.rb
lib/cocoapods/sandbox/headers_store.rb
+3
-2
No files found.
lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb
View file @
2cb671fa
...
@@ -109,13 +109,13 @@ module Pod
...
@@ -109,13 +109,13 @@ module Pod
# @return [Object] the result of the generator.
# @return [Object] the result of the generator.
#
#
def
update_changed_file
(
generator
,
path
)
def
update_changed_file
(
generator
,
path
)
path
.
dirname
.
mkpath
if
path
.
exist?
if
path
.
exist?
result
=
generator
.
save_as
(
support_files_temp_dir
)
result
=
generator
.
save_as
(
support_files_temp_dir
)
unless
FileUtils
.
identical?
(
support_files_temp_dir
,
path
)
unless
FileUtils
.
identical?
(
support_files_temp_dir
,
path
)
FileUtils
.
mv
(
support_files_temp_dir
,
path
)
FileUtils
.
mv
(
support_files_temp_dir
,
path
)
end
end
else
else
path
.
dirname
.
mkpath
result
=
generator
.
save_as
(
path
)
result
=
generator
.
save_as
(
path
)
end
end
clean_support_files_temp_dir
if
support_files_temp_dir
.
exist?
clean_support_files_temp_dir
if
support_files_temp_dir
.
exist?
...
...
lib/cocoapods/sandbox/headers_store.rb
View file @
2cb671fa
...
@@ -96,6 +96,7 @@ module Pod
...
@@ -96,6 +96,7 @@ module Pod
# @return [Array<Pathname>]
# @return [Array<Pathname>]
#
#
def
add_files
(
namespace
,
relative_header_paths
)
def
add_files
(
namespace
,
relative_header_paths
)
root
.
join
(
namespace
).
mkpath
unless
relative_header_paths
.
empty?
relative_header_paths
.
map
do
|
relative_header_path
|
relative_header_paths
.
map
do
|
relative_header_path
|
add_file
(
namespace
,
relative_header_path
)
add_file
(
namespace
,
relative_header_path
)
end
end
...
@@ -115,9 +116,9 @@ module Pod
...
@@ -115,9 +116,9 @@ module Pod
#
#
# @return [Pathname]
# @return [Pathname]
#
#
def
add_file
(
namespace
,
relative_header_path
)
def
add_file
(
namespace
,
relative_header_path
,
directory_made:
false
)
namespaced_path
=
root
+
namespace
namespaced_path
=
root
+
namespace
namespaced_path
.
mkpath
unless
File
.
exist?
(
namespaced_path
)
namespaced_path
.
mkpath
unless
directory_made
absolute_source
=
(
sandbox
.
root
+
relative_header_path
)
absolute_source
=
(
sandbox
.
root
+
relative_header_path
)
source
=
absolute_source
.
relative_path_from
(
namespaced_path
)
source
=
absolute_source
.
relative_path_from
(
namespaced_path
)
...
...
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