monkey2 icon indicating copy to clipboard operation
monkey2 copied to clipboard

Can't save files on Windows 10

Open Difference opened this issue 7 years ago • 5 comments

In Windows 10 (Pro), this fails. I've tried GetPrefsPath() too, and it fails too. CreateDir() works.

Using std..

Function Main()

    Local buf:= New DataBuffer(100,ByteOrder.LittleEndian)
    Local res:= buf.Save("C:\temp\mybuf.dat")
    Print "Saveresult is: " + res
    
End```

Difference avatar Apr 24 '18 07:04 Difference

Can you try with forward slashes? Backslashes are still causing issues - will get it fixed ASAP.

On Tue, Apr 24, 2018 at 7:00 PM, Difference [email protected] wrote:

In Windows 10 Pro, this fails. I've tried GetPrefsPath() too, and it fails too.

Using std..

Function Main()

Local buf:= New DataBuffer(100,ByteOrder.LittleEndian)
Local res:= buf.Save("C:\temp\mybuf.dat")
Print "Saveresult is: " + res

End```

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blitz-research/monkey2/issues/373, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3QgGAvIqQgdqE_-p1dDmBaqFS8yEhks5trs2agaJpZM4ThGzE .

blitz-research avatar Apr 24 '18 11:04 blitz-research

Yay! Forward slashes fixes it. Also works for SDL_GetPrefsPath files.

Difference avatar Apr 24 '18 12:04 Difference

Issue could be closed.

seyhajin avatar Jun 04 '19 14:06 seyhajin

Issue could be closed.

Why? Has it been solved and tested by yourself or are you referring to the fact there is a workaround for the issue?

nitrologic avatar Jun 04 '19 20:06 nitrologic

The code above works with backslashs or forward slashs under Windows 10, the problem being the save path is protected by the system (the C: drive for exemple) and refuses to write. The generated executable of sample works if it's run as administrator.

seyhajin avatar Jun 04 '19 22:06 seyhajin