it's the first post I publish. I have a little code in c ++ that I need to modify to make it work on M1. The purpose of this code is to take the path of the file to be downloaded from the .plist file, and through remotezip (python) download it, remove the path and save it in the destination folder. however, when it comes to recalling the file from the server, I receive segmentation faults. I have no way to debug the code. Thanks in advance for who will help me.
//this line allows me to correctly download the Manifest.plist is on the Root of the zip and i don't have any problem.
system((std::string("remotezip ") + zip.link + " " + "Manifest.plist ").c_str());
Inside M.plist we look for the correct path of bss, there are multiple bss file in different folders, but differ by board in the name.
std::string BSS(std::string board){
//Working Path for Download
chdir((std::string("WorkD_") + identifier + "_" + version).c_str());
std::ifstream Manifest("Manifest.plist");
while(getline(Manifest, bss.path)) {
//Select the one matching with Board input.
if(bss.path.find(board) != std::string::npos) {
for(int i = 0; i < 4000 && getline(Manifest, bss.path); i++) {
if(bss.path.find("BSS.")!= std::string::npos) {
Manifest.close();
bss.path.erase(0, 14);
for(int y = 0; y < bss.path.size(); y++) {
if(bss.path[y] == '<') {
bss.path.erase(y);
//Remote zip work only if the path is complete like remotezip google.com /files/random/bss and it will also mkdir files and random..I believe this is the problem.
system((std::string("remotezip") + zip.link + " " + bss.path).c_str());
bss.path.erase(0, 13);
bss.name = bss.path;
}
}
}
}
}
}
return bss.name;
}