← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 572: Fixed a bug when checking to see if a SVG title file exists in the project before it's been created.

 

------------------------------------------------------------
revno: 572
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Thu 2011-09-15 23:43:03 -0500
message:
  Fixed a bug when checking to see if a SVG title file exists in the project before it's been created.
modified:
  openshot/classes/files.py


--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main

Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/classes/files.py'
--- openshot/classes/files.py	2011-09-14 19:59:03 +0000
+++ openshot/classes/files.py	2011-09-16 04:43:03 +0000
@@ -464,6 +464,11 @@
 	def file_exists_in_project(self, file_name):
 		""" Check if this file exists in this project """
 		
+		# check if file exists
+		if not os.path.exists(file_name):
+			# File does not exist!
+			return False
+		
 		# don't add a file that is alrady in this folder (i.e. dupe check)
 		for item in self.items:
 			folder = self.FindFolder(item.name)