taviso / 123elf

A native port of Lotus 1-2-3 to Linux.
1.16k stars 59 forks source link

Unable to save file #69

Closed d-vb closed 2 years ago

d-vb commented 2 years ago

Saving is unfortunately not possible for me /File Save Enter name of file to save: /home/foo/file0001.wk3.

I get the following error message: Unable to reserve file: it is already reserved -- Press HELP

Unable to reserve file: it is already reserved

 You selected /File Admin Reservation Get when someone else was using
 the file with the reservation.

 You can get the reservation if no one else has it and if the file
 has not changed on disk since you read it into memory. Try again later
 to get the reservation.

This will create an empty file /home/foo/file0001.wk3.

To be on the safe side, I tried the following: /File Admin Reservation Release and get this error message The worksheet file has no reservation -- Press HELP.

The worksheet file has no reservation

 The following conditions could have caused this error:

 * You tried to save a file and you did not have the reservation. You must
   have the reservation to save a file. Use /File Admin Reservation Get
   to try to get the reservation.

 * You tried to release the reservation with /File Admin Reservation
   Release when you did not have the reservation. You are already
   using a read-only file.

 * You tried to save a worksheet file to a directory or disk file to which
   you do not have write-privileges at the UNIX level. Change the
   permissions with the UNIX  chmod  command and repeat the /File Save.
taviso commented 2 years ago

Hmm, that's definitely supposed to be working - what distribution is this?

taviso commented 2 years ago

I think I've figured out what happened. It turns out that the msb of st_dev means something special in UNIX, I don't know where that is documented, but 123 seems to think it means "file is not local".

So your device id just happens to have that bit set. I searched around and it doesn't seem to use that field for anything else, so I think I can safely just clear that bit.

taviso commented 2 years ago

Okay - I think it should be fixed, please let me know if it worked!

d-vb commented 2 years ago

Thank you very much, it works now.