Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default directory for the json file #88

Open
2 tasks
nicolaje opened this issue Oct 26, 2015 · 1 comment
Open
2 tasks

Change default directory for the json file #88

nicolaje opened this issue Oct 26, 2015 · 1 comment

Comments

@nicolaje
Copy link
Member

Following discussion in #23 , we should target the TMP directory of the user instead of its Home directory by default for writing the .json file. On Windows, "." suffixed files are still visible, so it can give the impression that VIBes is messing with the user's directory for people unfamiliar with its internals.

  • Identify environment variables for getting a good TMP directory on OSX, Linux, Windows (%TMP%)
  • Change HOM to this TMP folder
@dvinc
Copy link
Contributor

dvinc commented Oct 28, 2015

I think we can follow the approach of gettempdir() defined in Python module tempfile: https://docs.python.org/2/library/tempfile.html#tempfile.tempdir

Python searches a standard list of directories and sets tempdir to the first one which the calling user can create files in. The list is:

  1. The directory named by the TMPDIR environment variable.
  2. The directory named by the TEMP environment variable.
  3. The directory named by the TMP environment variable.
  4. A platform-specific location:
    • On RiscOS, the directory named by the Wimp$ScrapDir environment variable.
    • On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
    • On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
  5. As a last resort, the current working directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants