C++ Obtain rename and save file with RemoteZip (python)

it is the primary publish I publish. I’ve just a little code in c ++ that I would like to change to make it work on M1. The aim of this code is to take the trail of the file to be downloaded from the .plist file, and thru remotezip (python) obtain it, take away the trail and put it aside within the vacation spot folder. nevertheless, with regards to recalling the file from the server, I obtain segmentation faults. I’ve no strategy to debug the code. Thanks prematurely for who will assist me.

//this line permits me to appropriately obtain the Manifest.plist is on the Root of the zip and i haven’t got any downside.

system((std::string("remotezip ") + zip.hyperlink + " " + "Manifest.plist ").c_str());

Inside M.plist we search for the proper path of bss, there are a number of bss file in numerous folders, however differ by board within the title.

std::string BSS(std::string board){

//Working Path for Obtain 
chdir((std::string("WorkD_") + identifier + "_" + model).c_str());

std::ifstream Manifest("Manifest.plist");
 whereas(getline(Manifest, bss.path)) {

//Choose the one matching with Board enter.

  if(bss.path.discover(board) != std::string::npos) {
   for(int i = 0; i < 4000 && getline(Manifest, bss.path); i++) {
    if(bss.path.discover("BSS.")!= std::string::npos) {
      bss.path.erase(0, 14);
       for(int y = 0; y < bss.path.dimension(); y++) {
        if(bss.path[y] == '<') {

//Distant zip work provided that the trail is full like remotezip google.com /recordsdata/random/bss and it'll additionally mkdir recordsdata and random..I imagine that is the issue.
          system((std::string("remotezip") + zip.hyperlink + " " + bss.path).c_str());
           bss.path.erase(0, 13);
            bss.title = bss.path;
  return bss.title;

See also  File add API server in Vapor 4

Leave a Reply