Indentation-based Sort
Python 2, 117 bytes



lambda S:[s[-1]for s in sorted(reduce(lambda t,s:t+[[v for v in t[-1]if v.count(' ')&lt;s.count(' ')]+[s]],S,[[]]))[1:]]


Try it online!

Takes as input a list of strings; and outputs a list of strings, sorted as required.

The idea is to turn each element into a list which contains the "absolute path" as a list; and then let Python handle the sorting. E.g. if the input is:

[
 'a',
 ' c',
 '  d',
 ' b'
]


Then via the reduce(), we convert to a list of lists:

[
 ['a'],
 ['a',' c'],
 ['a',' c', '  d'],
 ['a',' b']
]


which gets sorted as:

[
 ['a'],
 ['a',' b']
 ['a',' c'],
 ['a',' c', '  d'],
]


and then output the last element of each list in the list-of-lists to get:

[
 'a',
 ' b'
 ' c',
 '  d',
]