# HG changeset patch # User Olaf Wintermann # Date 1763906737 -3600 # Node ID 159172937c86907fd57168b56a302c5aa83d20eb # Parent a95045234b9b1b7e0d9e8d78e3c2544059a256c7 implement Location VFS directive diff -r a95045234b9b -r 159172937c86 src/server/daemon/location.c --- a/src/server/daemon/location.c Sun Nov 23 14:59:52 2025 +0100 +++ b/src/server/daemon/location.c Sun Nov 23 15:05:37 2025 +0100 @@ -71,6 +71,13 @@ return 1; } } + } else if(!cx_strcasecmp(name, "VFS")) { + DIR_CHECK_ARGC(1); + location->config.vfs = cx_strdup_a(a, dir->args->value); + VfsType *vfs = vfs_get_type(cx_strcast(location->config.vfs)); + if(!vfs) { + log_ereport(LOG_MISCONFIG, "unknown VFS type %s", location->config.vfs.ptr); + } } else if(!cx_strcasecmp(name, "Location")) { WSLocation *sub_location = cfg_location_get(cfg, dir); if(!sub_location) { diff -r a95045234b9b -r 159172937c86 src/server/safs/nametrans.c --- a/src/server/safs/nametrans.c Sun Nov 23 14:59:52 2025 +0100 +++ b/src/server/safs/nametrans.c Sun Nov 23 15:05:37 2025 +0100 @@ -289,6 +289,14 @@ } req->location = config; + if(config->vfs.ptr) { + VFS *vfs = vfs_create(sn, rq, config->vfs.ptr, pb, NULL); + if(!vfs) { + return REQ_ABORTED; + } + rq->vfs = vfs; + } + return REQ_NOACTION; }