make directories more efficiently
git-svn-id: svn://svn.berlios.de/gpodder@100 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
6e18a0c533
commit
1f3fb58f5e
|
@ -1,3 +1,6 @@
|
|||
Tue, 11 Apr 2006 18:53:00 +0200 <thp@perli.net>
|
||||
* Make directories recursively, more efficient (in libgpodder)
|
||||
|
||||
Mon, 10 Apr 2006 18:44:48 +0200 <thp@perli.net>
|
||||
* Added "Released" column to available podcasts list
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ from os.path import expanduser
|
|||
from os.path import exists
|
||||
from os.path import dirname
|
||||
from os import mkdir
|
||||
from os import makedirs
|
||||
from os import environ
|
||||
from os import system
|
||||
from os import unlink
|
||||
|
@ -111,16 +112,8 @@ class gPodderLibClass( object):
|
|||
self.loadConfig()
|
||||
|
||||
def createIfNecessary( self, path):
|
||||
#TODO: recursive mkdir all parent directories
|
||||
|
||||
if path.endswith('/'):
|
||||
path = path[:-1]
|
||||
|
||||
if not exists(dirname(path)):
|
||||
mkdir(dirname(path))
|
||||
|
||||
if not exists( path):
|
||||
mkdir( path)
|
||||
makedirs( path)
|
||||
|
||||
def getConfigFilename( self):
|
||||
return self.gpodderdir + "gpodder.conf"
|
||||
|
|
Loading…
Reference in New Issue