MeshCentral icon indicating copy to clipboard operation
MeshCentral copied to clipboard

Files with long filenames (>250 approx.) won't show in Device\Files tab

Open panreyes opened this issue 1 month ago • 6 comments

Describe the bug Files with long filenames (>250 approx.) won't show in Device\Files tab

To Reproduce

  1. Create a file with a long long filename.

Expected behavior It should appear on the Files tab.

Server Software (please complete the following information): MeshCentral, latest.

Client Device (please complete the following information): Windows 10 PC.

Additional context Files or paths with more than 250 characters have always been an issue in Windows systems, as it's supported but not at the same time. Explorer will let you see these files, but won't let you operate in any way with them. The only way I know to do anything with them is by using UNC paths ( \?\C:\longfilename... )

panreyes avatar Nov 20 '25 23:11 panreyes

~~this isnt really a bug but a windows issue~~ ~~windows doesnt allow showing more then 250 characters in a file name anyways~~ ~~so when the meshagent looks for the files, it fails to return them because windows cant show/find them anyways~~

ignore see below

si458 avatar Nov 21 '25 11:11 si458

scratch my previous comment just created a random string of 256 characters (A-Z a-z 0-9) with .txt at the end created a temp folder C:\temp
called the file name the random string and put random string inside the txt file opened meshcentral, into files, can see the file, edit, download, no problems

Image

are you maybe talking about the 250 folder depth limit of windows?

EDIT: also you havent filled in the bug report properly so it could be a number of issues old meshcentral version, old node, windows xp/7, need to complete the full bug report in future plz

EDIT2: have you also tried this https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/

si458 avatar Nov 21 '25 11:11 si458

Because of Windows shenanigans, at least in W10 and W11, it will let programs to create files with longer names or paths that what should be accepted, even if the extended file path option is not enabled.

This is the offending full file path that did not appear on MeshCentral: "C:\COMPARTIDO\mensajes\SUBVENCIONES\SUBVENCIONES XXXX\GOBIERNO DE ESPAÑA\transporte\XXXXX XXXX XXXXXXX\Ayuda directa extraordinaria y temporal para sufragar el precio de determinados productos energéticos para las empresas de transporte por carretera que no se beneficien de la devolución parcial del Impuesto sobre Hidrocarburos por el gasóleo de uso pr.pdf"

Even Explorer was not able to operate with that file. I used 7zip file manager to rename it. After renaming it to something shoter, the file appeared in the Files tab.

A script I use for backups made with AutoIT does see this file too.

It would be useful if MeshCentral at least could enumerate the file so the user would not be confused about it not appearing there. Still, it's not too important.

panreyes avatar Nov 21 '25 11:11 panreyes

The problem is when we get the list of files I bet u its not listed in the back end c++ code and this is because of Windows

Also u have special characters too in the file name and I think meshagent need it to be utf8

gasóleo

si458 avatar Nov 21 '25 12:11 si458

Image

those 'special characters' are fine.

Melo-Professional avatar Nov 22 '25 21:11 Melo-Professional

so i just tested your setup, created the folders as you listed above, and even called the file the exact same thing you called it works perfectly fine, but windows does shorten the file name

Image

si458 avatar Nov 24 '25 19:11 si458