sublimetext-automatic-backups
sublimetext-automatic-backups copied to clipboard
FileNotFoundError: [WinError 206] The filename or extension is too long
I realize this is a Windows limitation and I'm not entirely sure how you might go about solving it, but I'm running into the 260 char file path limit when trying to save files with deep folder structures and/or long filenames.
Changing 'backup_dir' to something shorter is helpful, and I've read about registry tweaks and group policy changes to enable Win32 long paths, but perhaps there's a programmatic solution for working around the char limit?
Edit: missing word
That is probably going to be outside the scope of this plugin.
I would suggest creating a NTFS junction that lets you reference into the long path, e.g. c:/my_backups
targeting c:/my/very/long/.../path/backups
Thanks for the advice, Joel, and thank you for this extension!
FYI, this is mainly happening because I'm trying to use sublimetext-automatic-backups in conjunction with the SFTP extension while editing remote files. The sites I work on already have fairly deep folder structures, then the SFTP extension creates an even deeper temp file. It's a fringe case but I at least wanted it to be on your radar.
Wanted to leave this here for people like me who stumbled through the bushes into the comments. How to Enable Win32 Long Paths in Windows 11/10