mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
folders->directories
Signed-off-by: hsinko <21551195@zju.edu.cn>
This commit is contained in:
parent
89f6d3b041
commit
772f5495b7
1 changed files with 5 additions and 0 deletions
|
@ -233,6 +233,8 @@ func (a *Driver) Create(id, parent, mountLabel string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// createDirsFor creates two directories for the given id.
|
||||||
|
// mnt and diff
|
||||||
func (a *Driver) createDirsFor(id string) error {
|
func (a *Driver) createDirsFor(id string) error {
|
||||||
paths := []string{
|
paths := []string{
|
||||||
"mnt",
|
"mnt",
|
||||||
|
@ -243,6 +245,9 @@ func (a *Driver) createDirsFor(id string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// Directory permission is 0755.
|
||||||
|
// The path of directories are <aufs_root_path>/mnt/<image_id>
|
||||||
|
// and <aufs_root_path>/diff/<image_id>
|
||||||
for _, p := range paths {
|
for _, p := range paths {
|
||||||
if err := idtools.MkdirAllAs(path.Join(a.rootPath(), p, id), 0755, rootUID, rootGID); err != nil {
|
if err := idtools.MkdirAllAs(path.Join(a.rootPath(), p, id), 0755, rootUID, rootGID); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue