XhmikosR / notepad2-mod

LOOKING FOR DEVELOPERS - Notepad2-mod, a Notepad2 fork, a fast and light-weight Notepad-like text editor with syntax highlighting
https://xhmikosr.github.io/notepad2-mod/
Other
1.45k stars 272 forks source link

Does not open files on file share through VPN #231

Open gamepirog opened 6 years ago

gamepirog commented 6 years ago

After opening and closing any text file this exact file does not open any more. Windows notepad works fine. Connection to remote host using L2TP. Remote host is a Mikrotik router running RouterOS v6.42.6. Tried sheres both on windows and linux samba servers inside corporate network behind mikrotik router.

zufuliu commented 6 years ago

Most users can't setup a VPN, I suggest you download the source code put breakpoints in following two functions in Notepad2.c: line 6808:

BOOL FileIO(BOOL fLoad, LPCWSTR psz, BOOL bNoEncDetect, int *ienc, int *ieol,
            BOOL *pbUnicodeErr, BOOL *pbFileTooBig,
            BOOL *pbCancelDataLoss, BOOL bSaveCopy)

line 6847:

BOOL FileLoad(BOOL bDontSave, BOOL bNew, BOOL bReload, BOOL bNoEncDetect, LPCWSTR lpszFile)

Debug it, see what cause the failure.

If you don't have Visual Studio 2017 at hand, you can download source code from https://github.com/zufuliu/notepad2, and follow Build Notepad2 and metapath to use GCC and CodeLite to debug. Note the related line number is 6726 and 6764 in this repository.