Skip to content

Commit bc615d7

Browse files
committed
https://coding.net/u/coding/p/Coding-iOS/topic/158353
1 parent 40e221e commit bc615d7

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

Coding_iOS/Controllers/CodeViewController.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ - (void)refreshCodeViewData{
106106
NSURL *imageUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@u/%@/p/%@/git/raw/%@/%@", [NSObject baseURLStr], _myProject.owner_user_name, _myProject.name, _myCodeFile.ref, _myCodeFile.file.path]];
107107
DebugLog(@"imageUrl: %@", imageUrl);
108108
[self.webContentView loadRequest:[NSURLRequest requestWithURL:imageUrl]];
109-
}else if ([_myCodeFile.file.mode isEqualToString:@"file"] ||
110-
[_myCodeFile.file.mode isEqualToString:@"sym_link"]){
109+
}else if ([@[@"file", @"sym_link", @"executable"] containsObject:_myCodeFile.file.mode]){
111110
NSString *contentStr = [WebContentManager codePatternedWithContent:_myCodeFile isEdit:NO];
112111
[self.webContentView loadHTMLString:contentStr baseURL:nil];
113112
}

Coding_iOS/Controllers/ProjectViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ - (void)goToVCWith:(CodeTree_File *)codeTreeFile andRef:(NSString *)ref{
326326
vc.myProject = _myProject;
327327
vc.myCodeTree = nextCodeTree;
328328
[self.navigationController pushViewController:vc animated:YES];
329-
}else if ([@[@"file", @"image", @"sym_link"] containsObject:codeTreeFile.mode]){//文件
329+
}else if ([@[@"file", @"image", @"sym_link", @"executable"] containsObject:codeTreeFile.mode]){//文件
330330
CodeFile *nextCodeFile = [CodeFile codeFileWithRef:ref andPath:codeTreeFile.path];
331331
CodeViewController *vc = [CodeViewController codeVCWithProject:_myProject andCodeFile:nextCodeFile];
332332
[self.navigationController pushViewController:vc animated:YES];

0 commit comments

Comments
 (0)