# `GSLayer correctPathDirection`

*Instance Method*

Sets closed path directions according to containment and puts the outer path first.

## Declaration

```swift
func correctPathDirection()
```

```objc
- (void) correctPathDirection;
```

```python
correctPathDirection()
```

## Discussion

Open paths are not changed.

## See Also

### Cleaning Paths

- [`GSLayer cleanUpPaths`](/Core/GlyphsCore/GSLayer/cleanUpPaths) — Removes empty and negligible paths and simplifies the remaining paths.
- [`GSLayer checkConnections`](/Core/GlyphsCore/GSLayer/checkConnections) — Updates node connections to match the geometry of their paths.
- [`GSLayer checkForCoincidentPaths`](/Core/GlyphsCore/GSLayer/checkForCoincidentPaths) — Finds paths whose nodes have coincident positions.

