Re: [Lazarus] With new Win32 manifest LongPathAware I cannot make long filename
The new "Long path awareness" option is working! Apparently, you need to do both, embed the manifest and enable long paths in the registry or group policy. Only then you will be able to use long paths without the "\\?\" prefix. To enable via the Local Group Policy Editor, navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem> Enable Win32 long paths = Enabled. Tested on Windows 10, Lazarus 2.1.0 r59644, using RenameFile RTL routine. Regards, Denis On 23/11/2018 14:24, AlexeyT via lazarus wrote: This app cannot make 2nd folder (it can make 1st) and make file. Error on file saving. why? new manifest option is used. Win10. { TForm1 } const s1='w123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012'; base='c:\work\'; procedure TForm1.Button1Click(Sender: TObject); var f: TStringList; begin ForceDirectories(base+s1+'\'+s1); f:= tstringlist.create; f.add('zzz'); f.SaveToFile(base+s1+'\'+s1+'\test.txt'); f.free; end; -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] With new Win32 manifest LongPathAware I cannot make long filename
Am 23.11.2018 um 15:24 schrieb AlexeyT via lazarus: > This app cannot make 2nd folder (it can make 1st) and make file. Error > on file saving. why? new manifest option is used. Win10. Does the same code work if you use the LongPathsEnabled registry setting? If so, there may be something off with the manifest... -- Regards, Martok Ceterum censeo b32079 esse sanandam. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] With new Win32 manifest LongPathAware I cannot make long filename
I turned new Ide manifest option (subj) on, so I can skip prefix, no? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] With new Win32 manifest LongPathAware I cannot make long filename
On Fri, 23 Nov 2018, AlexeyT via lazarus wrote: This app cannot make 2nd folder (it can make 1st) and make file. Error on file saving. why? new manifest option is used. Win10. { TForm1 } const s1='w123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012'; base='c:\work\'; procedure TForm1.Button1Click(Sender: TObject); var f: TStringList; begin ForceDirectories(base+s1+'\'+s1); ForceDirectories is in the FPC RTL. It probably would need to obey the \\?\ prefix if long paths are to be supported. Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] With new Win32 manifest LongPathAware I cannot make long filename
This app cannot make 2nd folder (it can make 1st) and make file. Error on file saving. why? new manifest option is used. Win10. { TForm1 } const s1='w123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012'; base='c:\work\'; procedure TForm1.Button1Click(Sender: TObject); var f: TStringList; begin ForceDirectories(base+s1+'\'+s1); f:= tstringlist.create; f.add('zzz'); f.SaveToFile(base+s1+'\'+s1+'\test.txt'); f.free; end; -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus