--- cdli/cdli_files.py 2006/10/04 07:18:23 1.45 +++ cdli/cdli_files.py 2006/10/04 07:33:22 1.46 @@ -310,28 +310,28 @@ class uploadATFThread(Thread): founds=ctx2.CDLICatalog.search({'title':fn}) #if not than add filename to the list of newfiles - - data=file(os.path.join(dir,fn)).read() - status,msg=checkFile(fn,data,dir) - - if not status: # error - errors.append((fn,msg)) - else: - if len(founds)==0: - newPs.append(fn) - - #if p file alread at the server - for found in founds: - #analyse the differences to the actual file - obj=found.getObject() - - if (not (str(obj.lockedBy))=='') and (not (str(obj.lockedBy)==str(self.username))): - lockerrors.append(fn) - else: - - diffs=obj.diff(data) - if diffs[0]>0: - changed.append((obj,diffs)) #hochladen + + data=file(os.path.join(dir,fn)).read() + status,msg=checkFile(fn,data,dir) + + if not status: # error + errors.append((fn,msg)) + else: + if len(founds)==0: + newPs.append(fn) + + #if p file alread at the server + for found in founds: + #analyse the differences to the actual file + obj=found.getObject() + + if (not (str(obj.lockedBy))=='') and (not (str(obj.lockedBy)==str(self.username))): + lockerrors.append(fn) + else: + + diffs=obj.diff(data) + if diffs[0]>0: + changed.append((obj,diffs)) #hochladen #ready, set the returnValues self.result+="