Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/pbxProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,14 @@ pbxProject.prototype.addPbxGroup = function (filePathsArray, name, path, sourceT
if(opt.target) {
file.target = opt.target;
}
if (fs.existsSync(filePath) && (fs.lstatSync(filePath).isDirectory() || fs.lstatSync(filePath).isSymbolicLink()) && !isAssetFileType(file.lastKnownFileType)) {
// if the file is a symLink, isDirectory() returns false
// but isFile() too so we need to see if the realPath is a directory
const exists = fs.existsSync(filePath);
const stats = exists && fs.lstatSync(filePath);
const isSymlink = exists && fs.lstatSync(filePath).isSymbolicLink();
let symRealPath = isSymlink && fs.realpathSync(filePath);
const isRealDir = stats && stats.isDirectory() || (isSymlink && fs.lstatSync(symRealPath).isDirectory());
if (exists && isRealDir && !isAssetFileType(file.lastKnownFileType)) {
if($path.extname(filePath) === ".lproj") {
continue;
}
Expand Down