weimingtom / nekonme

Automatically exported from code.google.com/p/nekonme
0 stars 0 forks source link

nme.net.SharedObject.getLocal on linux tries to save to root directory by default #244

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. nme.net.SharedObject.getLocal(name);

What is the expected output? What do you see instead?
Expect: Saving somewhere sane.
See: Error : [file_open,//EXAMPLE.sol]

What version of the product are you using? On what operating system?
haXe 2.09; nme 3.3.3
Kernel: Linux 3.2.0-2-amd64 (x86_64)
Distribution: Linux Mint Debian XFCE Edition

Please provide any additional information below.
Looking over the source, it seems that 
nme.filesystem.File.applicationStorageDirectory.nativePath is a blank string on 
linux.

Original issue reported on code.google.com by sevencol...@gmail.com on 18 Jun 2012 at 1:00

GoogleCodeExporter commented 8 years ago
This is not only causing problems on linux. On my Mac i constantly have to 
delete the SharedObject sol-file, because otherwise my app crashes directly on 
startup.

NME is generating a path like this:
I am doing this to get the SO:
so = SharedObject.getLocal( _kernel.factory.id, "/" );

which leads to a path like this:
/Users/tr/Library/Application Support/game///FIND_A_PET.sol

Even if I remove the slash, the path is still wrong.

On my Blackberry Playbook it's crashing too.

Original comment by tobias.r...@gmail.com on 20 Jun 2012 at 2:10

GoogleCodeExporter commented 8 years ago
Happens to me too. Saving anything is broken on Linux, which also makes 
HaxeFlixel break hard (crashes every time you change volume)

It really should be fixed, especially since comments in nme/filesystem/File.hx 
say "On Linux, it is /home/userName" which it apparently is not.

Original comment by Asmaged...@gmail.com on 20 Aug 2012 at 10:31