Skip to content

Conversation

@MagnificentPako
Copy link

I suggest that the Tempdir standard moves from a hardcoded location to a path defined by a setting, which can be changed to the user's preferences.

fs.delete("/tmp")
fs.makeDir("/tmp")
-- check if tempdir setting exists; If it doesn't, set it
if settings.get("tempdir") == nil then
Copy link
Contributor

@SquidDev SquidDev Jul 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to do settings.get("tempdir", "/tmp") rather than setting it.

@SquidDev
Copy link
Contributor

I think this probably needs a little bit more rewording than just replacing every instance of /tmp with settings.get("tempdir", "/tmp").

I'm also curious of your use-case here? It seems to add a lot of complications without much tangible benefit.

@oeed
Copy link
Owner

oeed commented Jul 25, 2017

Could you please elaborate on the benefits/use cases of this?

I can see this causing a large number of difficulties and complications. With this you would basically have to include a settings API with every program that wants to save temporary files. We don't have anything else in this API you mention either, so I doubt it would be used that much. The way I see it the more simple this is the more likely it is going to be used.

So unfortunately it's probably a no from me, but if you do have solutions to these issues by all means point them out.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants