Opened 7 years ago

Last modified 3 years ago

#9680 new enhancement

get_datadir_fname2_suffix() should create missing directories as needd

Reported by: nickm Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay robustness mkdir
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


In #9645, mr-4 notes that Tor behaves inconsistently if the datadir gets obliterated. IMO, removing the datadir of a running Tor is not a supported operation... but that's no reason not to be a little robust when we can.

One opportunity we have here is to just make get_datadir_fname2_suffix() always check whether the directory it's about to give a fname in exists, and if so, create it. (We should audit its uses though to make sure that's sensible. Perhaps it needs to take a create-dir-if-needed flag.)

Child Tickets

Change History (1)

comment:1 Changed 3 years ago by nickm

Keywords: robustness mkdir added
Severity: Normal
Note: See TracTickets for help on using tickets.