Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordstar saves only to drive A -- Possibly not a WS issue #1

Closed
wd5gnr opened this issue Jul 22, 2020 · 5 comments
Closed

Wordstar saves only to drive A -- Possibly not a WS issue #1

wd5gnr opened this issue Jul 22, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@wd5gnr
Copy link

wd5gnr commented Jul 22, 2020

I haven't run it down yet, but for some reason WordStar always saves to drive a: -- could be disk handling or could be some problem with the WS configuration. Try this:

../../target/debug/iz-cpm --disk-a . --disk-b ../wordstar33 --disk-c ../zork --disk-d ..
b:
ws
N        (new non document)
B:TEST.TXT     (or just TEST.TXT)
Anything        (type anything)
^KX

The file TEST.TXT will now be on A: Even stranger, it tries to read from B. So if you do a ^KS instead of ^KX the file will be saved but it will reread from B where the file is blank. The same thing happens on other drives. The save winds up on A and the reread comes from the drive you intended. So if you save to drive A it works fine. Any other drive, no.

A related problem is a side effect. If you are testing and do ^KS to save, your file goes blank (because it saves to A and rereads from B). If you now save again (say a ^KX to get out), you will write a blank file over your original file on A so now when you type the file on drive A it will be blank. Not really a bug because it would not happen if the reread were picking up the file which it would if the save had occurred on that drive.

I'll let you know if I find anything else out. This is on a clone of the repo, by the way. I have not tried it with the release version.

@wd5gnr
Copy link
Author

wd5gnr commented Jul 22, 2020

ED appears to have the same behavior.

Using the release binaries, nothing saves from Wordstar anywhere as far as I can tell.

@ivanizag
Copy link
Owner

I can reproduce with your instructtions.

There is an issue with the rename BDOS call. Wordstar saves the file to "B:TEST.$$$" and then renames it to "B:TEST.TXT". The way fs.rename() in Rust works, the destination needs the full path. If none is given, the file is moved to the current (host) directory.

I will commit a fix.

Thank you for the report.

@ivanizag ivanizag added the bug Something isn't working label Jul 22, 2020
@wd5gnr
Copy link
Author

wd5gnr commented Jul 22, 2020

Thanks!

@wd5gnr wd5gnr closed this as completed Jul 23, 2020
@wd5gnr
Copy link
Author

wd5gnr commented Jul 23, 2020

Tested.. Works great.

@ivanizag
Copy link
Owner

Thank you for verifying the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants