On 2023-08-25 16:30, Maf. King wrote:
> I've just had a thought on a possible reason the original file could not be 
> saved.  I may be barking up the wrong tree.....
> 
> Does Win have a maximum length for a filename?

It does, both for filename specifically (see below) and for total of
path+filename.  But recent versions of Windows have
increased it to the point where real-life use is unlikely to hit the limit.

However, "In the Windows API [for use by applications, as opposed to
components of Windows itself], the maximum length for a path is
MAX_PATH, which is defined as 260 characters. A local path is structured
in the following order: drive letter, colon, backslash, name components
separated by backslashes, and a terminating null character."

<https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry>

I doubt that file save dialogs are be affected by that, since they're
part of Windows, but maybe.

Later in the same article, there is a procedure to remove that
limitation in the Windows API, if you're in Windows 10 or 11. I hesitate
to suggest that Barry try that procedure himself, because it involves
editing the Windows Registry. However, anyone who's comfortable with
Registry edits could easily follow the directions to do it for him.

> If Barry (OP) has been repeatedly opening and working on backups and backups 
> of backups etc.., is it possible that repeated time-stamps have hit some sort 
> of string-length limit (either in Win, GC, Gnome-libs or whatever layer)??
> 
> Last time I was actively using MS for anything regularly, the filename length 
> limit was 8+3 ... so I'll defer to pretty much anyone's opinion on this! 

That limit was increased to 254 (or maybe 199) about 20 years ago, with
the release of Windows XP. No blame to you for not knowing, if you don't
use Windows.

<https://stackoverflow.com/questions/265769/maximum-filename-length-in-ntfs-windows-xp-and-windows-vista>


Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to