File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,9 +352,10 @@ interpreted as paths relative to ccon's [current working
352352directory] [ getcwd.3 ] .
353353
354354If ** ` target ` ** does not exist, ccon will attempt to create it by
355- calling [ ` mkdir ` ] [ mkdir.3p ] , making multiple calls if necessary. If
356- ** ` source ` ** is set to a non-directory and ** ` target ` ** does not exit,
357- ccon will create an empty file at ** ` target ` ** to mount over.
355+ calling [ ` mkdir ` ] [ mkdir.3p ] , making multiple calls if necessary. For
356+ bind mounts where ** ` source ` ** is set to a non-directory and
357+ ** ` target ` ** does not exit, ccon will create an empty file at
358+ ** ` target ` ** to mount over.
358359
359360In addition to the usual types supported by [ ` mount ` ] [ mount.2 ] , ccon
360361supports a ` pivot-root ` ** ` type ` ** that invokes the
Original file line number Diff line number Diff line change @@ -2386,7 +2386,9 @@ static int handle_mounts(json_t * config)
23862386 PERROR ("stat" );
23872387 return 1 ;
23882388 }
2389- mkdir = S_ISDIR (buf .st_mode );
2389+ if (flags | MS_BIND && !S_ISDIR (buf .st_mode )) {
2390+ mkdir = 0 ;
2391+ }
23902392 }
23912393 if (mkdir ) {
23922394 if (mkdir_all (target , 0777 ) == -1 ) {
You can’t perform that action at this time.
0 commit comments