Fixed a bug where index.html was copied into the main folder and errored out trying to load resources.

This commit is contained in:
Joey Payne 2014-11-18 11:50:35 +13:00
commit 44dd95ce7b
3 changed files with 9 additions and 8 deletions

View file

@ -1,4 +1,5 @@
0.11.0-rc1
0.11.0
0.10.5
0.10.4
0.10.3

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

16
main.py
View file

@ -354,6 +354,7 @@ class MainWindow(QtGui.QWidget):
def __init__(self, width, height, parent=None):
super(MainWindow, self).__init__(parent)
self.setWindowIcon(QtGui.QIcon('icon.png'))
self.update_json = False
self.setup_nw_versions()
@ -631,7 +632,6 @@ class MainWindow(QtGui.QWidget):
self.progress_label.setText(str(value))
def runInBackground(self, method_name, callback):
self.thread = BackgroundThread(self, method_name)
self.thread.finished.connect(callback)
self.thread.start()
@ -668,12 +668,10 @@ class MainWindow(QtGui.QWidget):
if f:
f.close()
def doneGettingVersions(self):
self.ex_button.setEnabled(self.requiredSettingsFilled())
self.progress_text = 'Done retrieving versions.'
def makeOutputFilesInBackground(self):
self.ex_button.setEnabled(False)
self.runInBackground('makeOutputDirs', self.doneMakingFiles)
@ -1225,11 +1223,13 @@ class MainWindow(QtGui.QWidget):
for sgroup in self._setting_groups:
for setting in sgroup.values():
if setting.type == 'file' and setting.value:
try:
shutil.copy(setting.value, self.projectDir())
setting.value = os.path.basename(setting.value)
except shutil.Error as e:#same file warning
log( 'Warning: {}'.format(e))
f_path = setting.value.replace(self.projectDir(),'')
if not os.path.exists(f_path):
try:
shutil.copy(setting.value, self.projectDir())
setting.value = os.path.basename(setting.value)
except shutil.Error as e:#same file warning
log( 'Warning: {}'.format(e))
os.chdir(old_dir)