Commit Graph

2 Commits

Author SHA1 Message Date
Xavier Delaruelle
67352f374c Handle empty dir in getModules dir consolidation
When consolidating directory content information in getModules
procedure, handle empty directories so they are removed from the result
array. When an empty directory is removed and its parent directory
becomes empty after child removal, remove also this directory and so on.

Moreover when an empty directory is removed and if it was the default
version of this parent directory, default is changed to last element in
parent directory.

Add and adapt tests in 020-avail of 91-sort suite.
2017-07-08 14:46:30 +02:00
Xavier Delaruelle
2304331122 Optimize getPathToModule when solved alias is upper-mod
Improve getPathToModule procedure to be able to solve any-kind of module
aliases within a single call rather than restarting new searches when
solved aliases are on the upper part (elt1/) of a current search
(elt1/elt2/) sharing same module root.

Add isSameModuleRoot procedure on the way to be able to check two
modules share the same base name.

Add non-regression tests in 020-load and 030-display of 80-deep suite to
guaranty that sub or upper aliases are correctly found.
2017-04-17 15:16:14 +02:00