Skip to content

Commit

Permalink
fix the issue of A problem about AppDelegate/getV2rayPath method
Browse files Browse the repository at this point in the history
  • Loading branch information
uidq4502 authored and uidq4502 committed Jul 20, 2022
1 parent 1e71a98 commit 6c85f90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion V2RayX/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ -(NSString*)getV2rayPath {
NSString* defaultV2ray = [NSString stringWithFormat:@"%@/xray", [[NSBundle mainBundle] resourcePath]];
NSFileManager* fileManager = [NSFileManager defaultManager];
NSString* cusV2ray = [NSString stringWithFormat:@"%@/Library/Application Support/V2RayXS/xray-core/xray",NSHomeDirectory()];
for (NSString* binary in @[@"v2ray", @"v2ctl"]) {
for (NSString* binary in @[@"xray"]) {
NSString* fullpath = [NSString stringWithFormat:@"%@/Library/Application Support/V2RayXS/xray-core/%@",NSHomeDirectory(), binary];
BOOL isDir = YES;
if (![fileManager fileExistsAtPath:fullpath isDirectory:&isDir] || isDir || ![fileManager setAttributes:@{NSFilePosixPermissions: [NSNumber numberWithShort:0777]} ofItemAtPath:fullpath error:nil]) {
Expand Down

0 comments on commit 6c85f90

Please sign in to comment.