Temporary chmod fix

This commit is contained in:
luboslenco
2025-11-21 00:08:42 +01:00
parent 392bbc302c
commit b09a5d8d11
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ static NSURLSession *download_session = nil;
NSError *error = nil;
NSURL *destURL = [NSURL fileURLWithPath:dstPath];
[[NSFileManager defaultManager] moveItemAtURL:location toURL:destURL error:&error];
// todo
if ([dstPath hasSuffix:@"sd_vulkan"] || [dstPath hasSuffix:@"sd_cpu"]) {
NSDictionary *attrs = @{ NSFilePosixPermissions : @0755 };
NSError *chmodError = nil;
+12
View File
@@ -102,6 +102,18 @@ function neural_node_download(url: string) {
file_download_to(url, file_path, function (url: string) {
neural_node_downloading--;
console_log(tr("Downloaded file from") + " " + url);
/// if arm_linux
// todo
if (ends_with(url, "sd_vulkan")) {
let bin: string = neural_node_dir() + "/sd_vulkan";
iron_sys_command("chmod +x '" + bin + "'");
}
else if (ends_with(url, "sd_cpu")) {
let bin: string = neural_node_dir() + "/sd_cpu";
iron_sys_command("chmod +x '" + bin + "'");
}
/// end
});
}