code: func (s *Store) removeEmptyParentDirectories(path string) error {
  	parent := filepath.Dir(path)
  
  	if relpath, err := filepath.Rel(s.path, parent); err != nil {
  		return err
  	} else if strings.HasPrefix(relpath, ".") {
  		return nil
  	}
  
  	err := os.Remove(parent)
  	switch {
  	case err == nil:
  		return s.removeEmptyParentDirectories(parent)
  	case err.(*os.PathError).Err == syscall.ENOTEMPTY:
  		// ignore when directory is non-empty
  		return nil
  	default:
  		return err
  	}
  }
docs: // Deletes all empty parent directories up to the store root