Skip to content

Commit f082343

Browse files
author
Anis Kadri
committed
Merge branch 'vladimir-kotikov-master'
2 parents be6005e + f6f75d1 commit f082343

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/pbxFile.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,12 @@ function pbxFile(filepath, opt) {
166166
// for custom frameworks
167167
if (opt.customFramework == true) {
168168
this.customFramework = true;
169-
this.dirname = path.dirname(filepath);
169+
this.dirname = path.dirname(filepath).replace(/\\/g, '/');
170170
}
171171

172-
this.path = defaultPath(this, filepath);
172+
this.path = defaultPath(this, filepath).replace(/\\/g, '/');
173173
this.fileEncoding = this.defaultEncoding = opt.defaultEncoding || defaultEncoding(self);
174174

175-
176175
// When referencing products / build output files
177176
if (opt.explicitFileType) {
178177
this.explicitFileType = opt.explicitFileType;

lib/pbxProject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pbxProject.prototype.removeFramework = function(fpath, opt) {
304304
this.removeFromPbxEmbedFrameworksBuildPhase(file); // PBXCopyFilesBuildPhase
305305

306306
if (opt && opt.customFramework) {
307-
this.removeFromFrameworkSearchPaths(path.dirname(fpath));
307+
this.removeFromFrameworkSearchPaths(file.dirname);
308308
}
309309

310310
return file;

test/dataModelDocument.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ exports.dataModelDocument = {
152152
test.equal(xcVersionGroupEntry.children[0], newFile.models[0].fileRef);
153153
test.equal(xcVersionGroupEntry.currentVersion, newFile.currentModel.fileRef);
154154
test.equal(xcVersionGroupEntry.name, path.basename(singleDataModelFilePath));
155-
test.equal(xcVersionGroupEntry.path, singleDataModelFilePath);
155+
// Need to validate against normalized path, since paths should contain forward slash on OSX
156+
test.equal(xcVersionGroupEntry.path, singleDataModelFilePath.replace(/\\/g, '/'));
156157
test.equal(xcVersionGroupEntry.sourceTree, '"<group>"');
157158
test.equal(xcVersionGroupEntry.versionGroupType, 'wrapper.xcdatamodel');
158159

0 commit comments

Comments
 (0)