It's not that simple, what if the environment var points to a directory on a drive that is not present? Or to a location for which calibre does not have write permissions?
calibre has fairly sophisticated logic to pick a temp dir that it knows will work, if the user chooses to explicitly override that logic, it is upto him to make sure it is a suitable location.
As for falling back to the system temp dir, to me having a program ignore my explicitly set temp dir and pick another temp dir would be incorrect/unexpected behavior. Instead when my setting is wrong the program should fail, giving me a chance to fix it. Imagine I was using the temp var for security purposes, silently ignoring it would then be a big fail.
It's not that simple, what if the environment var points to a directory on a drive that is not present? Or to a location for which calibre does not have write permissions?
calibre has fairly sophisticated logic to pick a temp dir that it knows will work, if the user chooses to explicitly override that logic, it is upto him to make sure it is a suitable location.
As for falling back to the system temp dir, to me having a program ignore my explicitly set temp dir and pick another temp dir would be incorrect/ unexpected behavior. Instead when my setting is wrong the program should fail, giving me a chance to fix it. Imagine I was using the temp var for security purposes, silently ignoring it would then be a big fail.