vfs resolving algo
How's that algo for resolving vfspath ?
It seems to works ok, to resolve both vfs->real and real->vfs...
// Fetch the right vfs for uid
// search userfile for vfsfile
// if not found... search groupfile for vfsfile
// if not found... search default userfile in ioftpd.ini
// max=0
// For each line in the .vfs file
// compare the start of the vfs from the file with the start of the vfs_path to resolve
// if match... and if strlen(vfspath_from_file)>max... save realpath as best_realpath and the length of the vfs_path that match as max
// concat best_realpath and substr(vfs_path,max+1,end)
|