Add fix for chromium saving files to FUSE filesys
Chromium 130 won't save to our filesystem if we don't return a max filename length. Dummy parameters were tried for inode counts, but these do not seem to be necessary. Not also that btrfs foes not return values for these fields.
This commit is contained in:
parent
5dc4fdbc2c
commit
6a49ff9946
@ -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 <stddef.h>
|
||||
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user