Skip to content

Commit c5047b5

Browse files
committed
Bugfixed xcdatamodeld group detection
1 parent 7fcc0e7 commit c5047b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pbxFile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function defaultEncoding(fileRef) {
9494
}
9595

9696
function detectGroup(fileRef) {
97-
var extension = path.extname(this.basename).substring(1),
97+
var extension = path.extname(fileRef.basename).substring(1),
9898
filetype = fileRef.lastKnownFileType || fileRef.explicitFileType,
9999
groupName = GROUP_BY_FILETYPE[unquoted(filetype)];
100100

@@ -159,6 +159,7 @@ function pbxFile(filepath, opt) {
159159

160160
self = this;
161161

162+
this.basename = path.basename(filepath);
162163
this.lastKnownFileType = opt.lastKnownFileType || detectType(filepath);
163164
this.group = detectGroup(self);
164165

@@ -168,7 +169,6 @@ function pbxFile(filepath, opt) {
168169
this.dirname = path.dirname(filepath);
169170
}
170171

171-
this.basename = path.basename(filepath);
172172
this.path = defaultPath(this, filepath);
173173
this.fileEncoding = this.defaultEncoding = opt.defaultEncoding || defaultEncoding(self);
174174

0 commit comments

Comments
 (0)