()
| 247 | # Look up the namecoin data folder. |
| 248 | # FIXME: Check whether this works on other platforms as well! |
| 249 | def lookupNamecoinFolder (): |
| 250 | app = "namecoin" |
| 251 | from os import path, environ |
| 252 | if sys.platform == "darwin": |
| 253 | if "HOME" in environ: |
| 254 | dataFolder = path.join (os.environ["HOME"], |
| 255 | "Library/Application Support/", app) + '/' |
| 256 | else: |
| 257 | print ("Could not find home folder, please report this message" |
| 258 | + " and your OS X version to the BitMessage Github.") |
| 259 | sys.exit() |
| 260 | |
| 261 | elif "win32" in sys.platform or "win64" in sys.platform: |
| 262 | dataFolder = path.join(environ["APPDATA"], app) + "\\" |
| 263 | else: |
| 264 | dataFolder = path.join(environ["HOME"], ".%s" % app) + "/" |
| 265 | |
| 266 | return dataFolder |
| 267 | |
| 268 | # Ensure all namecoin options are set, by setting those to default values |
| 269 | # that aren't there. |
no outgoing calls
no test coverage detected