GenericAccountDirectories always result in a path relative to the rootPath
Hello, i have the following issue, i think that it was mentioned (but denied) in this case .
services.Configure<DotNetFileSystemOptions>(opt => { opt.RootPath = @"c:\anonymous"; }); ... public IAccountDirectories GetDirectories(IAccountInformation accountInformation) { return new GenericAccountDirectories(rootPath: "c:\mypath"); }
Read/Write operations are performed on c:\anonymous\mypath\
Expected: c:\mypath
It seems that there was a similar problem in #74 and it seems that the order of the IAccountDirectoryQuery registration is important. It has the be registered after the AddFtpServer, because it'll be "overwritten" if you register it before the AddFtpServer.
Hum apparently no i do add the IAccountDirectoryQuery after the AddFtpServer:
services.Configure<DotNetFileSystemOptions>(opt =>
{
opt.RootPath = _configuration["Messages:Folder"];
opt.FlushAfterWrite = true;
});
services.AddFtpServer(builder => builder.UseDotNetFileSystem());
services.AddSingleton<IAccountDirectoryQuery, FtpAccountDirectoryQuery>();
services.Configure<FtpServerOptions>(opt =>
{
opt.ServerAddress = _configuration["FtpListener:Ip"];
opt.Port = _configuration.GetSection("FtpListener").GetValue<int>("Port");
opt.MaxActiveConnections = 100;
opt.ConnectionInactivityCheckInterval = TimeSpan.FromMinutes(2);
});
Note: breakpoint do step by my IAccountDirectoryQuery implementation.