[SOLVED] NTFS Links getting destroyed on save

General and specific configuration/INI settings

[SOLVED] NTFS Links getting destroyed on save

Postby V@no » Wed Jul 07, 2010 1:14 am

Hello.

If a file is a NTFS Link/SymbolicLink (or has a NTFS Link/SymbolicLink) then on save UES creates a new file with the same name and in a process destroys any NTFS links that associated with that file.

I'm using Link Shell Extension on Windows XP 32bit and Windows 7 64bit.
To reproduce the situation do the following (assuming the above shell extension already installed. Please note, the above software is only a GUI, the NTFS links is a feature of the NTFS filesystem and can be created via command prompt without any 3nd party software):

1) create a file: C:\folder1\example.txt
2) create a NTFS Link (Hardlink/SymbolicLink) of that file and save it as: C:\folder2\example.txt
3) Edit file C:\folder1\example.txt in notepad/wordpad, save it.
4) Open C:\folder2\example.txt in UES, you should see the text that you added in C:\folder1\example.txt
5) Open C:\folder1\example.txt in UES and change the text, save it.
6) Open C:\folder2\example.txt in UES again - no last changes were added into that file, NTFS link is broken, now system has 2 independent, unlinked files


You can see it on video:
http://www.youtube.com/watch?v=1Ke-M31gYLI
User avatar
V@no
Basic User
Basic User
 
Posts: 20
Joined: Thu Jul 22, 2004 11:00 pm

Re: NTFS Links getting destroyed on save

Postby Mofi » Wed Jul 07, 2010 3:54 am

I'm not using NTFS links, but I think the reason for this behavior is how backup files are created by UES/UE. By default UES/UE creates the backup file by renaming the original file and then saving the modified file with the original name. This backup strategy is fast, but works only for backup files created in the same directory as the original file. In UltraEdit I have disabled the backup feature and in UEStudio I have specified a separate backup directory for the backups of the files and therefore I think I would not have this problem even when using NTFS links because no backup file to create respectively original file must be copied to the backup directory and can't be just renamed.

However, by enabling configuration setting Copy file instead of using rename when creating backup file at Advanced - Configuration - File Handling - Advanced should result in not destroying the NTFS links.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4062
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: NTFS Links getting destroyed on save

Postby V@no » Wed Jul 07, 2010 4:15 am

Mofi wrote:However, by enabling configuration setting Copy file instead of using rename when creating backup file at Advanced - Configuration - File Handling - Advanced should result in not destroying the NTFS links.

Bulls eye!
Enable that option seems to cured the problem.

Thank you very much!
User avatar
V@no
Basic User
Basic User
 
Posts: 20
Joined: Thu Jul 22, 2004 11:00 pm


Return to Configuration/INI Settings