diff options
author | erikb <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) |
commit | 9b11bb274f3dbbe65843ee2d08d0e678636460fc (patch) | |
tree | 47a3810a2807fe82e94cc516f49826615182e118 /utils.py | |
parent | 03b4a5ba0ae444cad3114b34350eec8707483203 (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.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 ): |