[mythtv] [mythtv-commits] Ticket #4593: /.mythtv/ should *not* get created (blank homedir)

Nigel Pearson nigel at ind.tansu.com.au
Tue Feb 5 22:41:13 UTC 2008

Nigel proposed a quick hack:
>  Yes, if HOME isn't set, QDir::homeDirPath() seems to return '/'.  
> The real
>  question is, what should it be in this situation? Current  
> directory? /tmp?

Michael sensibly proposed:
> Ignored?  Shut down with an error (a descriptive error, that is) and
> force the user to configure the system properly?
> rather than a fallback the user is unaware of).

You convinced me.

Ignored is my preferred option, because I hope
to eventually make the frontend work without
any writable directories (e.g. live CD).
Sadly, that requires some caching
changes that are not ready yet.

Ignoring will not be a quick patch though -
it has to support Unix, Unix running as root
(where HOME might actually be '/'), and Windows.

How about exit with a message like "Cannot continue -
there is no home directory set for storing configuration.
Please set the HOME or MYTHCONFDIR environment variables"

That should cover the Unixes.
(I will have to test what Windows needs)

Nigel Pearson, nigel at ind.tansu.com.au|"I thought I said no shivs."
Telstra Net. Eng., Sydney, Australia |   "This? This is just a
Office: 9202 3900    Fax:  9261 3912 | personal grooming appliance"
Mobile: 0408 664435  Home: 9792 6998 |    Riddick - Pitch Black

More information about the mythtv-dev mailing list