Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2008-03-13 15:34:51 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2008-03-13 15:34:51 (GMT)
commit9b11bb274f3dbbe65843ee2d08d0e678636460fc (patch)
tree47a3810a2807fe82e94cc516f49826615182e118 /utils.py
parent03b4a5ba0ae444cad3114b34350eec8707483203 (diff)
54 updates
git-svn-id: http://mediamods.com/public-svn/camera-activity/tags/54@1056 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils.py b/utils.py
index 19ac57e..7244ab0 100644
--- a/utils.py
+++ b/utils.py
@@ -47,12 +47,12 @@ def loadSvg( data, stroke, fill ):
def getUniqueFilepath( path, i ):
pathOb = os.path.abspath( path )
- if (os.path.exists(pathOb)):
- i = i+1
- newPath = os.path.join( os.path.dirname(pathOb), str( str(i) + os.path.basename(pathOb) ) )
- return getUniqueFilepath( str(newPath), i )
+ newPath = os.path.join( os.path.dirname(pathOb), str( str(i) + os.path.basename(pathOb) ) )
+ if (os.path.exists(newPath)):
+ i = i + 1
+ return getUniqueFilepath( pathOb, i )
else:
- return os.path.abspath( path )
+ return os.path.abspath( newPath )
def md5File( filepath ):