sodero / InstallerLG

A reimplementation of the LISP-like 'Installer' scripting language.
Other
16 stars 4 forks source link

Fix startup updates #56

Closed gareth-smyth closed 4 years ago

gareth-smyth commented 4 years ago

When amiga os 68k tries to add to the user-startup file it fails and exits.

// Create temporary file.
snprintf(tmp, tln, "%s.XXXXXX", fln);
FILE *file = fdopen(mkstemp(tmp), "w");

The failure is on the third line and debugging it seemed to suggest whatever is being returned from mkstemp is not a valid file descriptor.

If I change the "w" to "w+" it works, and I'm assuming this won't have a knock-on effect on any other architectures as opening in read/write should be okay compared to write only.

sodero commented 4 years ago

Excellent. For some reason this generated a conflict with master (I can't see why) so I merged it manually. I'll close this one.

gareth-smyth commented 4 years ago

👍 Cheers