End of file when saving
Moderators: AmigoJack, bbadmin, helios, MudGuard
I think this problem (the mo version of this topic) has been solved. TextPad support suggested an upgrade of my video card (after seeing my screenshot of TextPad displaying an image). I have done a few "real" edits since and also a few tests and have not had the problem again.
Best Wishes!
Mike Olds
Mike Olds
End of file when saving
I tried to ignore this problem but it bugs me every day when I have to erase the file and do a Save As in order for my file to be saved correctly.
If I delete lines in a file I have edited and I save it, the end of the file is not adjusted for the new size of the file. I can open the file again and the last few lines of the file are repeated at the end.
Notepad does not do this and Write does not do this. I know that Helios said the problem does not occur with Notepad and and Write because they save files differently but why can't it be an option to save the files the way Notepad does so that I don't keep having this problem?
If I delete lines in a file I have edited and I save it, the end of the file is not adjusted for the new size of the file. I can open the file again and the last few lines of the file are repeated at the end.
Notepad does not do this and Write does not do this. I know that Helios said the problem does not occur with Notepad and and Write because they save files differently but why can't it be an option to save the files the way Notepad does so that I don't keep having this problem?
The option you need is under Configure/Preferences/File: uncheck Overwrite original files directly when saving changes. In that state, a new file is created when saving, then the original deleted and the new file renamed to the original name.why can't it be an option to save the files the way Notepad does so that I don't keep having this problem?
The fundamental issue here is that TextPad is designed to work with Windows, and this problem does not arise with local files, or files on other servers running Windows. VisionFS is emulating Windows networking, but not doing it right, so the solution is to the use an alternative, such as the latest version of Samba, or getting the authors of VisionFS (SCO?) to fix it.
Keith MacDonald
Helios Sofware Solutions
End of file when saving
Would it be possible to provide an option to be able to specify the temporary directory for Textpad?
With the "Overwrite..." box unchecked, does Textpad write the file with a temporary name, delete the original, then rename the temporary file? I would be willing to take a chance on possible problems saving if I could have the temporary file written to another directory, the original deleted, and then the file written with the original file name. This kind of option might solve similar types of problems that will come along in the future as well.
I really like Textpad and I take it to all of my clients and encourage them to purchase it so I can use it when I am there. That's why I am continuing to bug you about this, hoping to make an excellent product even better.
Lee,
TextPad creates the temporary file in the folder containing the original file for two reasons:
1. Write access to that folder is guaranteed, otherwise you would not be able to save the file at all.
2. Any other folder could be on a different drive or computer, so the final rename could fail.
I suggest you check the access rights for folder N:\cbl, as it seems that renaming is not permitted. This could be a policy imposed by VisionFS, or the operating system running on the server.
Keith MacDonald
Helios Software Solutions
TextPad creates the temporary file in the folder containing the original file for two reasons:
1. Write access to that folder is guaranteed, otherwise you would not be able to save the file at all.
2. Any other folder could be on a different drive or computer, so the final rename could fail.
I suggest you check the access rights for folder N:\cbl, as it seems that renaming is not permitted. This could be a policy imposed by VisionFS, or the operating system running on the server.
Keith MacDonald
Helios Software Solutions
End of file when saving
Keith,
I have tried opening up security so that there are no restrictions on the folders but I still get the Access denied error on TXPnn.tmp.
I spoke with the support at visionFS and they suggested that since Notepad, Write, Wordpad, Word and WinVI all work that maybe it is something that Textpad is doing.
Thanks for looking at this problem. I appreciate your efforts.
Lee Robinson
I have tried opening up security so that there are no restrictions on the folders but I still get the Access denied error on TXPnn.tmp.
I spoke with the support at visionFS and they suggested that since Notepad, Write, Wordpad, Word and WinVI all work that maybe it is something that Textpad is doing.
Thanks for looking at this problem. I appreciate your efforts.
Lee Robinson
Lee,
Unlike those other editors you mentioned, TextPad uses memory mapping for saving files, as that is the fastest way to do it. The amount of memory allocated by Windows is a multiple of its paging size, which is 4KB. When the mapped file is closed, the last 4KB chunk is trimmed to the actual length of the file. VisionFS seems to be able to handle that for new files, but does not correctly truncate when saving over existing files.
When you select the option not to overwrite existing files, TextPad uses the Win32 API ReplaceFile, so that all attributes and ACLs are preserved. It seems to me that this is another thing that VisionFS has not implemented correctly. Perhaps you could find out?
As this issue only seems to affect you, I think we should continue this discussion privately, so I will contact you by email.
Keith MacDonald
Helios Software Solutions
Unlike those other editors you mentioned, TextPad uses memory mapping for saving files, as that is the fastest way to do it. The amount of memory allocated by Windows is a multiple of its paging size, which is 4KB. When the mapped file is closed, the last 4KB chunk is trimmed to the actual length of the file. VisionFS seems to be able to handle that for new files, but does not correctly truncate when saving over existing files.
When you select the option not to overwrite existing files, TextPad uses the Win32 API ReplaceFile, so that all attributes and ACLs are preserved. It seems to me that this is another thing that VisionFS has not implemented correctly. Perhaps you could find out?
As this issue only seems to affect you, I think we should continue this discussion privately, so I will contact you by email.
Keith MacDonald
Helios Software Solutions