diff options
author | 2008-09-24 21:16:37 -0400 | |
---|---|---|
committer | 2008-09-24 21:16:37 -0400 | |
commit | 3c909c583c109c271d5b858acae1614acf47dad4 (patch) | |
tree | b1f52dea9574ff2f4552da2c2f0115da8323437c | |
parent | 32503fed4cf3066b07384562f10b640026d634a8 (diff) | |
download | textadept-3c909c583c109c271d5b858acae1614acf47dad4.tar.gz textadept-3c909c583c109c271d5b858acae1614acf47dad4.zip |
Linux comes first; core/file_io.lua
-rw-r--r-- | core/file_io.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/file_io.lua b/core/file_io.lua index 6664d400..b87356f1 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -174,7 +174,7 @@ end -- @usage textadept.io.load_session(filename) function load_session(filename, only_pm) local textadept = textadept - local user_dir = os.getenv(WIN32 and 'USERPROFILE' or 'HOME') + local user_dir = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE') if not user_dir then return end local ta_session = user_dir..'/.ta_session' local f = io.open(filename or ta_session) @@ -294,7 +294,7 @@ function save_session(filename) local pm = textadept.pm session = session..("pm: %d %s\n"):format(pm.width, pm.entry_text) -- Write the session. - local user_dir = os.getenv(WIN32 and 'USERPROFILE' or 'HOME') + local user_dir = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE') if not user_dir then return end local ta_session = user_dir..'/.ta_session' local f = io.open(filename or ta_session, 'w') |