diff --git a/sesman/chansrv/chansrv_xfs.h b/sesman/chansrv/chansrv_xfs.h index 4b82fd202c..e28a891ab5 100644 --- a/sesman/chansrv/chansrv_xfs.h +++ b/sesman/chansrv/chansrv_xfs.h @@ -20,7 +20,13 @@ #ifndef _CHANSRV_XFS #define _CHANSRV_XFS -/* Skip this include if there's no FUSE */ +/* Maximum length of filename supported (in bytes). + * This is a sensible limit to a filename length. It is not used by + * this module to allocate long-lived storage, so it can be increased + * if necessary */ +#define XFS_MAXFILENAMELEN 1023 + +/* Skip the rest of this include if there's no FUSE */ #ifdef XRDP_FUSE #include @@ -29,12 +35,6 @@ #include "arch.h" -/* Maximum length of filename supported (in bytes). - * This is a sensible limit to a filename length. It is not used by - * this module to allocate long-lived storage, so it can be increased - * if necessary */ -#define XFS_MAXFILENAMELEN 1023 - /* * Incomplete types for the public interface */ diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 226252229d..47904d0158 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -1273,11 +1273,7 @@ devredir_proc_query_dir_response(IRP *irp, // Size the filename buffer so it's big enough for // storing the file in our filesystem if we need to. -#ifdef XFS_MAXFILENAMELEN char filename[XFS_MAXFILENAMELEN + 1]; -#else - char filename[256]; -#endif tui64 LastAccessTime; tui64 LastWriteTime; tui64 EndOfFile; @@ -2441,6 +2437,14 @@ devredir_proc_cid_statfs_resp(IRP *irp, fss.f_blocks = TotalAllocationUnits; fss.f_bfree = ActualAvailableAllocationUnits; fss.f_bavail = CallerAvailableAllocationUnits; + // Following values do not seem to be needed by + // any applications. btrfs also returns 0 for these + //fss.f_files = ???; + //fss.f_ffree = ???; + //fss.f_favail = fss.f_ffree; + // Chromium 130 needs this set, or the user can't save + // to our filesystem + fss.f_namemax = XFS_MAXFILENAMELEN; } } }