1
0
Fork 0
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:
hsinko 2016-02-29 21:32:30 -08:00
parent 89f6d3b041
commit 772f5495b7

View file

@ -233,6 +233,8 @@ func (a *Driver) Create(id, parent, mountLabel string) error {
return nil
}
// createDirsFor creates two directories for the given id.
// mnt and diff
func (a *Driver) createDirsFor(id string) error {
paths := []string{
"mnt",
@ -243,6 +245,9 @@ func (a *Driver) createDirsFor(id string) error {
if err != nil {
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 {
if err := idtools.MkdirAllAs(path.Join(a.rootPath(), p, id), 0755, rootUID, rootGID); err != nil {
return err