"if you have an assign hugo: which consists of work:a, work:b and work:c, if you enter "path hugo: add" only work:a is added to the path."
That's precisely what happened to me. I guess it's something that could be added in the OS then...
"and a lock can only point to a directory, "
or a file. When looking inside a given assign my code worked with assigns to a single file. I think it might be because I take off the device's name from the the rest of the given file path before calling GetDeviceProc(), and then try to lock that path in each directory (lock) GetDeviceProc successively gives, to check if the file is there. If there's just a device name the path given to GetDevProc will be NULL (since ":" ends the string to a device only name, followed by NULL). And null corresponds to the root directory, or in the case of a multiassign the directory (ies) corresponding to the assign.
Was just an attempt to understand it, but forget it, the thing works... :-)