Changeset 33225
- Timestamp:
- Feb 8, 2012, 2:23:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/CopyFromHostLocation.c
r33223 r33225 12 12 char srcname[1024]; 13 13 char tgtname[1024]; 14 char outdir[1024]; 14 15 15 16 md5_byte_t srcDigest[NDIGEST]; … … 28 29 if (!skylist->regions[i]->hostID) continue; 29 30 30 // skip catalogs which have not been copied back31 if ( skylist->regions[i]->hostFlags & DATA_ON_TGT) continue;31 // skip catalogs which are not on remote location 32 if (!(skylist->regions[i]->hostFlags & DATA_ON_TGT)) continue; 32 33 33 34 // skip catalogs which have an uncleared error … … 42 43 int success = TRUE; 43 44 45 char *subdir = pathname (skylist->regions[i]->name); 46 sprintf (outdir, "%s/%s", host->pathname, subdir); 47 free (subdir); 48 49 int status = check_dir_access (outdir, DEBUG); 50 if (!status) { 51 fprintf (stderr, "failed to find / create target path\n"); 52 exit (2); 53 } 54 44 55 char extname[4][16] = {"cpm", "cpt", "cps", "cpn"}; 45 56 for (j = 0; success && (j < 4); j++) { … … 52 63 53 64 // check permission to read file 54 intstatus = stat (srcname, &filestat);55 if ( !status) {65 status = stat (srcname, &filestat); 66 if (status) { 56 67 if (errno == ENOENT) continue; // file does not exist (handle broken table with cpt + cpm but no cpn,cps?) 57 68 perror ("stat:");
Note:
See TracChangeset
for help on using the changeset viewer.
