cc-4105: more refactorings, this time so that scan/watch diretories are always handled from one place

This commit is contained in:
Rudi Grinberg 2012-08-01 15:10:54 -04:00
parent 3b1583f620
commit ba78731f99
6 changed files with 83 additions and 62 deletions

View file

@ -308,6 +308,15 @@ def import_organize(store):
store = os.path.normpath(store)
return os.path.join(store,'organize'), os.path.join(store,'imported')
def expand_storage(store):
store = os.path.normpath(store)
return {
'organize' : os.path.join(store, 'organize'),
'recorded' : os.path.join(store, 'recorded'),
'problem_files' : os.path.join(store, 'problem_files'),
'imported' : os.path.join(store, 'imported'),
}
def create_dir(path):
"""
will try and make sure that path exists at all costs. raises an exception