[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open
Group: Bug
Labels: SciTE
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sat Aug 08, 2026 09:47 AM UTC
Owner: nobody
Environment:
Steps to reproduce:
Expected:
Actual:
Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
I have not been able to reproduce this either on my normal Windows 10 system or on a Windows 11 VM. However, my setups are generally very simple placing SciTE in local NTFS disk directories like 'C:\bin\scite'. The path comparison performs a CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, ... on the new and current buffer path. The current buffer path would have previously been processed with GetLongPathNameW to force case to match on-disk (in case user entered 'uNeXpEcTeD_cAsE').
There was a bug [#2476] a few versions back but that should be fixed.
Is there anything less common for your setup like being on a remote filesystem?
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sat Aug 08, 2026 11:18 PM UTC
Owner: nobody
It's a Windows 11 Pro setup on a laptop. SciTE is in "C:\Program Files\wscite", so an all-ASCII path. Windows settings are:
Now I see that it only reproduces if I launch SciTE from within my file manager ZTreeWin (https://ztree.com), version 2.4.217. So, first I press E on a text file in ZTreeWin. Then I can open cpp.properties many times. I'm unable to reproduce this by launching SciTE from the command prompt with a file path. If I open SciTE first via a shortcut, then use E from ZTreeWin, there is no issue.
ZTreeWin is closed-source, but I can try to ask the author how it launches the editor. Alt+F10 opens its settings and the only editor configuration is the path: "C:\Program Files\wscite\SciTE.exe". ZTreeWin is installed in "C:\Program Files\ZTree", if that matters.
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sat Aug 08, 2026 11:21 PM UTC
Owner: nobody
"Open Global Options File" is also affected. "Open User Options File" is not.
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sun Aug 09, 2026 07:25 AM UTC
Owner: nobody
I think the most likely direction is that there is some use of shortened paths so SciTE is using something like "C:\Progra~1\wscite\" as the basis for the properties file paths like "C:\Progra~1\wscite\cpp.properties" then calling GetLongPathNameW on that to assign the full path "C:\Program Files\wscite\cpp.properties" to the buffer. Then the second call sees no match between "C:\Progra~1\wscite\cpp.properties" and the buffer paths so it opens a new buffer.
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sun Aug 09, 2026 07:46 AM UTC
Owner: nobody
Yeah, I can reproduce the issue by running "\progra~1\wscite\scite" on the Windows command prompt.
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sun Aug 09, 2026 11:30 AM UTC
Owner: nobody
Then using GetFinalPathNameByHandleW() or compare the file ids similar to std::filesystem::equivalent() could fix the problem.
https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_id_info
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sun Aug 09, 2026 11:37 AM UTC
Owner: nobody
Committed fix [02f9a0] which calls GetLongPathNameW to change the module path to its long form.
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: open-fixed
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sun Aug 09, 2026 11:41 AM UTC
Owner: nobody
[bugs:#2514] Options / Open *.properties opens same file multiple times
Status: closed-fixed
Group: Bug
Labels: SciTE win32
Created: Sat Aug 08, 2026 09:47 AM UTC by Piotr Fusik
Last Updated: Sun Aug 09, 2026 11:14 PM UTC
Owner: nobody