End of file when saving
Moderators: AmigoJack, bbadmin, helios, MudGuard
- Lee
- Posts: 10
- Joined: Mon Sep 08, 2003 4:02 pm
End of file when saving
When I open and existing file, delete some lines, then save and close the file, the end of the file is not adjusted to the file size. I noticed this when I was editing source code, saving and trying to compile. I would get compile errors at the end of the program. When I looked at the cause I found that the last few lines of the program were duplicated. Upon experimenting, I found that the number of lines duplicated at the end corresponded to the number of lines I had deleted in the program. Whenever I delete lines now I have to erase the file first and then do a Save As.
Has anyone else had this problem?
I am running Textpad in Windows XP. My file server is SCO OpenServer and I am using VisionFS to provide the shared directories.
Has anyone else had this problem?
I am running Textpad in Windows XP. My file server is SCO OpenServer and I am using VisionFS to provide the shared directories.
-
mo
- Posts: 306
- Joined: Tue Mar 11, 2003 1:40 am
Not exactly the same problem but sounds like it could be related is an issue I have when running a file created by MacroScheduler (a macro creating/editing program). The file is saved (TextPad .txt file), but I edit the file, at the end of the file, when the last item is a delete, a few lines of jibberish is inserted at the end. If I click undo the line is deleted, but another line of jibberish is inserted, if I click undo again I risk closing the file. In other words, some strange stuff is going on at the end of the file under certain circumstances.
Best Wishes!
Mike Olds
Mike Olds
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Re Macro Scheduler files..........
I have no problem when editing MS files in TextPad.
1. Add Macro Scheduler (*.scp) to File Name Filters
Save Files as MacroName.scp
2. Make a Class for Macro Scheduler.
Class Details:
Use *.scp for file extentions.
Only have checks to Keep Indentation, and to use Word Wrap
No checkmark in box to Strip trailing spaces
Word Wrapping, Save with no breaks in lines
Default encoding = ANSI
Create new files as PC
3. Install MS syntax file for MS 7.2.038. Open the MS syntax file for 7.2.038 to read comments at end re selection of colors to approximate MS colors.
Hope this helps with the MS issue................good luck,
Bob
I have no problem when editing MS files in TextPad.
1. Add Macro Scheduler (*.scp) to File Name Filters
Save Files as MacroName.scp
2. Make a Class for Macro Scheduler.
Class Details:
Use *.scp for file extentions.
Only have checks to Keep Indentation, and to use Word Wrap
No checkmark in box to Strip trailing spaces
Word Wrapping, Save with no breaks in lines
Default encoding = ANSI
Create new files as PC
3. Install MS syntax file for MS 7.2.038. Open the MS syntax file for 7.2.038 to read comments at end re selection of colors to approximate MS colors.
Hope this helps with the MS issue................good luck,
Bob
- MudGuard
- Posts: 1295
- Joined: Sun Mar 02, 2003 10:15 pm
- Location: Munich, Germany
- Contact:
- bbadmin
- Site Admin
- Posts: 1038
- Joined: Mon Feb 17, 2003 8:54 pm
- Contact:
I agree with MudGuard. See if this thread sheds any light:
http://textpad.com/forum/viewtopic.php?t=4077
Keith MacDonald
Helios Software Solutions
http://textpad.com/forum/viewtopic.php?t=4077
Keith MacDonald
Helios Software Solutions
-
mo
- Posts: 306
- Joined: Tue Mar 11, 2003 1:40 am
My problem is occuring on local files. I am about to implement the workaround mentioned in the referenced thread. We'll see what happens.
PS: My TextPad is set up per Robert's specs for working on files of that type. But maybe it need clarifying that the files this is happening on are not .scp files or scripts of any sort, they are simple text files created as part of a script.
PS: My TextPad is set up per Robert's specs for working on files of that type. But maybe it need clarifying that the files this is happening on are not .scp files or scripts of any sort, they are simple text files created as part of a script.
Last edited by mo on Mon Sep 08, 2003 11:52 pm, edited 1 time in total.
Best Wishes!
Mike Olds
Mike Olds
- Lee
- Posts: 10
- Joined: Mon Sep 08, 2003 4:02 pm
I appreciate the prompt responses and I checked out the problem with Samba. It appears to be the same problem. However, Notepad.exe does not have this problem. It seems to be that if the cause were the server then Notepad and Textpad would both have problems with lack of file truncation. Notepad handles it just fine.
I tried unchecking the box and when I tried to save, I received this error msg: "Access to N:\cbl\TXP8F9.tmp was denied." This is the path to the shared directory but I don't know why access would have been denied. I can create, delete, and rename files there with Windows Explorer.
I don't remember having this problem with earlier versions of Textpad.
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
- bbadmin
- Site Admin
- Posts: 1038
- Joined: Mon Feb 17, 2003 8:54 pm
- Contact:
See if this thread helps: http://textpad.com/forum/viewtopic.php?t=2435Access to N:\cbl\TXP8F9.tmp was denied
My guess is that you've hit yet another anti-virus problem. Try it when active scanning is disabled, and if that helps, send a bug report to your anti-virus software supplier.My problem is occuring on local files
That's because it always deletes the original file. TextPad does not do that (except when Overwrite original files directly, when saving changes is not checked), so that the original file's creator and access modes are preserved. Unix file system semantics are different from Windows, so there's no way to query and set such information from a Windows application.Notepad.exe does not have this problem
Keith MacDonald
Helios Software Solutions
-
mo
- Posts: 306
- Joined: Tue Mar 11, 2003 1:40 am
Only one test on this so far with Files/Overwrite original files directly~ unchecked. I took none of the precautions I usually take to avoid the problem (Did not save the file after changes, did not turn off MacroScheduler after it had created the file) and it was a long and complex file and there were no problems.
Next test I will re-check the Files/Overwrite option and disable active virus scanning.
Next test I will re-check the Files/Overwrite option and disable active virus scanning.
Best Wishes!
Mike Olds
Mike Olds
- Lee
- Posts: 10
- Joined: Mon Sep 08, 2003 4:02 pm
End of file when saving
I tried turning off "overwrite original" and disabling the virus scan. I still receive the "access denied" message. I suppose I'll have to put up with removing and SaveAs when I delete lines in my files. Maybe I can set up a macro to replace my "Save" command. 
- bbadmin
- Site Admin
- Posts: 1038
- Joined: Mon Feb 17, 2003 8:54 pm
- Contact:
Lee, did you try doing what Dave suggested in this thread?
http://textpad.com/forum/viewtopic.php?t=2435
Keith MacDonald
Helios Software Solutions
http://textpad.com/forum/viewtopic.php?t=2435
Keith MacDonald
Helios Software Solutions
-
mo
- Posts: 306
- Joined: Tue Mar 11, 2003 1:40 am
Here is the result of:
1. Disabling auto-protect virus detection
2. clicking the option to Overwrite original files directly
(both before running the macro)
3. leaving MacroSaver running after it has created the file
4. not saving early and often
The problem of a final delete adding miscellaneous odd data to the end of the file re-appeared.
I changed back to the configuration that did not cause this problem, but this seems to discount the idea that it is the Virus detection that is causing the problem.
1. Disabling auto-protect virus detection
2. clicking the option to Overwrite original files directly
(both before running the macro)
3. leaving MacroSaver running after it has created the file
4. not saving early and often
The problem of a final delete adding miscellaneous odd data to the end of the file re-appeared.
I changed back to the configuration that did not cause this problem, but this seems to discount the idea that it is the Virus detection that is causing the problem.
Best Wishes!
Mike Olds
Mike Olds
- Lee
- Posts: 10
- Joined: Mon Sep 08, 2003 4:02 pm
Keith,
I assume by "doing what Dave suggested" you mean seeing if there is a more recent version of the file sharing software, VisionFS. Unfortunately, at this client, at this time, that isn't an option for me. I'll just work around it for a while. Maybe I can talk them into updating sometime. Thanks for the time and attention.
I assume by "doing what Dave suggested" you mean seeing if there is a more recent version of the file sharing software, VisionFS. Unfortunately, at this client, at this time, that isn't an option for me. I'll just work around it for a while. Maybe I can talk them into updating sometime. Thanks for the time and attention.
bbadmin wrote:Lee, did you try doing what Dave suggested in this thread?
http://textpad.com/forum/viewtopic.php?t=2435
Keith MacDonald
Helios Software Solutions