Avoided double attempt to set lfa flag "i" to newly created directory
This commit is contained in:
@@ -1046,5 +1046,36 @@ int Permstack_pop(struct PermiteM **o, struct PermiteM *stopper,
|
||||
}
|
||||
|
||||
|
||||
/* Look for stack item with disk_path
|
||||
@return 0= nothing found, 1= *stbuf and *immutable are valid
|
||||
*/
|
||||
int Permstack_peek(struct PermiteM **o, struct PermiteM *stopper,
|
||||
struct XorrisO *xorriso,
|
||||
char *disk_path, struct stat **stbuf, int *immutable,
|
||||
int flag)
|
||||
{
|
||||
struct PermiteM *m;
|
||||
|
||||
if((*o) == stopper)
|
||||
return(0);
|
||||
for(m= *o; m != NULL; m= m->next) {
|
||||
if(strcmp(m->disk_path, disk_path) == 0) {
|
||||
*stbuf= &(m->stbuf);
|
||||
*immutable= m->immutable;
|
||||
return(1);
|
||||
}
|
||||
if(m->next == stopper)
|
||||
break;
|
||||
}
|
||||
if(m == NULL) {
|
||||
sprintf(xorriso->info_text,
|
||||
"Program error: Permstack_peek() : cannot find stopper");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------- End PermstacK ----------------------------- */
|
||||
|
||||
|
Reference in New Issue
Block a user