summaryrefslogtreecommitdiff
path: root/patch/comercial/rsync-copy-engine.patch
blob: f469d504fcc44f8786da23a81f141d6c0ab82343 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
diff -U 3 -H -d -r -N -- Ultracopier-0.3/ListThread.cpp Rsync/ListThread.cpp
--- Ultracopier-0.3/ListThread.cpp	2012-06-26 14:12:53.082114806 +0200
+++ Rsync/ListThread.cpp	2012-06-29 22:21:40.395733284 +0200
@@ -28,6 +28,7 @@
 	numberOfInodeOperation		= 0;
 	maxSpeed			= 0;
 	doRightTransfer			= false;
+	rsync				= false;
 	keepDate			= false;
 	blockSize			= 1024;
 	osBufferLimit			= 512;
@@ -265,6 +266,21 @@
 	this->autoStart=autoStart;
 }
 
+/// \brief set rsync
+void ListThread::setRsync(const bool rsync)
+{
+	this->rsync=rsync;
+	int index=0;
+	loop_sub_size_transfer_thread_search=transferThreadList.size();
+	while(index<loop_sub_size_transfer_thread_search)
+	{
+		transferThreadList.at(index)->setRsync(rsync);
+		index++;
+	}
+	for(int i=0;i<scanFileOrFolderThreadsPool.size();i++)
+		scanFileOrFolderThreadsPool.at(i)->setRsync(rsync);
+}
+
 //set check destination folder
 void ListThread::setCheckDestinationFolderExists(const bool checkDestinationFolderExists)
 {
@@ -327,11 +343,13 @@
 	#endif
 	connect(scanFileOrFolderThreadsPool.last(),SIGNAL(newFolderListing(QString)),					this,SIGNAL(newFolderListing(QString)));
 	connect(scanFileOrFolderThreadsPool.last(),SIGNAL(addToRmPath(QString,int)),					this,SLOT(addToRmPath(QString,int)),				Qt::QueuedConnection);
+	connect(scanFileOrFolderThreadsPool.last(),SIGNAL(addToRmForRsync(QString)),					this,SLOT(addToRmForRsync(QString)),				Qt::QueuedConnection);
 	connect(scanFileOrFolderThreadsPool.last(),SIGNAL(addToMkPath(QString)),					this,SLOT(addToMkPath(QString)),				Qt::QueuedConnection);
 
 	connect(scanFileOrFolderThreadsPool.last(),SIGNAL(errorOnFolder(QFileInfo,QString)),				this,SLOT(errorOnFolder(QFileInfo,QString)),			Qt::QueuedConnection);
 	connect(scanFileOrFolderThreadsPool.last(),SIGNAL(folderAlreadyExists(QFileInfo,QFileInfo,bool)),		this,SLOT(folderAlreadyExists(QFileInfo,QFileInfo,bool)),	Qt::QueuedConnection);
 
+	scanFileOrFolderThreadsPool.last()->setRsync(rsync);
 	scanFileOrFolderThreadsPool.last()->setFilters(include,exclude);
 	scanFileOrFolderThreadsPool.last()->setCheckDestinationFolderExists(checkDestinationFolderExists && alwaysDoThisActionForFolderExists!=FolderExists_Merge);
 	if(scanFileOrFolderThreadsPool.size()==1)
@@ -761,6 +779,18 @@
 		actionToDoListInode_afterTheTransfer << temp;
 }
 
+//rsync rm
+void ListThread::addToRmForRsync(const QString& inode)
+{
+	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"inode: "+inode);
+	actionToDoInode temp;
+	temp.type	= ActionType_RmSync;
+	temp.id		= generateIdNumber();
+	temp.folder.setFile(inode);
+	temp.isRunning	= false;
+	actionToDoListInode << temp;
+}
+
 //send action done
 void ListThread::sendActionDone()
 {
@@ -1526,7 +1556,7 @@
 	loop_size=actionToDoListInode.size();
 	while(int_for_loop<loop_size)
 	{
-		if(actionToDoListInode.at(int_for_loop).type==ActionType_RmPath)
+		if(actionToDoListInode.at(int_for_loop).type==ActionType_RmPath || actionToDoListInode.at(int_for_loop).type==ActionType_RmSync)
 		{
 			ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("stop rmpath: %1").arg(actionToDoListInode.at(int_for_loop).folder.absoluteFilePath()));
 			actionToDoListInode.removeAt(int_for_loop);
@@ -1658,6 +1688,7 @@
 	last->set_osBuffer(osBuffer);
 	last->set_osBufferLimited(osBufferLimited);
 	last->set_osBufferLimit(osBufferLimit);
+	last->setRsync(rsync);
 
 	#ifdef ULTRACOPIER_PLUGIN_DEBUG
 	connect(last,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),this,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),	Qt::QueuedConnection);
@@ -1669,7 +1700,7 @@
 	connect(last,SIGNAL(preOperationStopped()),					this,SLOT(doNewActions_start_transfer()),				Qt::QueuedConnection);
 	connect(last,SIGNAL(postOperationStopped()),					this,SLOT(transferInodeIsClosed()),					Qt::QueuedConnection);
 	connect(last,SIGNAL(checkIfItCanBeResumed()),					this,SLOT(restartTransferIfItCan()),					Qt::QueuedConnection);
-	connect(last,SIGNAL(pushStat(TransferStat,quint64)),				this,SLOT(newTransferStat(TransferStat,quint64)),	Qt::QueuedConnection);
+	connect(last,SIGNAL(pushStat(TransferStat,quint64)),				this,SLOT(newTransferStat(TransferStat,quint64)),			Qt::QueuedConnection);
 
 	connect(this,SIGNAL(send_sendNewRenamingRules(QString,QString)),		last,SLOT(setRenamingRules(QString,QString)),				Qt::QueuedConnection);
 
diff -U 3 -H -d -r -N -- Ultracopier-0.3/ListThread.h Rsync/ListThread.h
--- Ultracopier-0.3/ListThread.h	2012-06-25 16:46:19.931261209 +0200
+++ Rsync/ListThread.h	2012-06-29 21:53:37.495762350 +0200
@@ -77,7 +77,8 @@
 	enum ActionType
 	{
 		ActionType_MkPath=1,
-		ActionType_RmPath=2
+		ActionType_RmPath=2,
+		ActionType_RmSync=3
 	};
 	/// \brief to store one action to do
 	struct actionToDoInode
@@ -155,6 +156,8 @@
 	void setBlockSize(const int blockSize);
 	/// \brief set auto start
 	void setAutoStart(const bool autoStart);
+	/// \brief set rsync
+	void setRsync(const bool rsync);
 	/// \brief set check destination folder
 	void setCheckDestinationFolderExists(const bool checkDestinationFolderExists);
 	/// \brief set data local to the thread
@@ -196,6 +199,7 @@
 	quint64				bytesToTransfer;
 	quint64				bytesTransfered;
 	bool				autoStart;
+	bool				rsync;
 	bool				putInPause;
 	QList<returnActionOnCopyList>	actionDone;///< to action to send to the interface
 	quint64				idIncrementNumber;///< to store the last id returned
@@ -302,6 +306,8 @@
 	quint64 addToMkPath(const QString& folder);
 	//add rm path to do
 	void addToRmPath(const QString& folder,const int& inodeToRemove);
+	//rsync rm
+	void addToRmForRsync(const QString& inode);
 	//send the progression, after full reset of the interface (then all is empty)
 	void syncTransferList_internal();
 signals:
diff -U 3 -H -d -r -N -- Ultracopier-0.3/ListThread_InodeAction.cpp Rsync/ListThread_InodeAction.cpp
--- Ultracopier-0.3/ListThread_InodeAction.cpp	2012-06-29 21:57:47.000000000 +0200
+++ Rsync/ListThread_InodeAction.cpp	2012-06-29 22:19:11.515735854 +0200
@@ -19,6 +19,14 @@
 	if(numberOfInodeOperation>=ULTRACOPIER_PLUGIN_MAXPARALLELINODEOPT)
 		return;
 break;
+case ActionType_RmSync:
+	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("launch rm to sync: %1").arg(currentActionToDoInode.folder.absoluteFilePath()));
+	rmPathQueue.addPath(currentActionToDoInode.folder.absoluteFilePath(),true);
+	currentActionToDoInode.isRunning=true;
+	numberOfInodeOperation++;
+	if(numberOfInodeOperation>=ULTRACOPIER_PLUGIN_MAXPARALLELINODEOPT)
+		return;
+break;
 case ActionType_RmPath:
 /*	What is this code?
 	if((int_for_loop+number_rm_path_moved)>=(loop_size-1))
@@ -34,7 +42,7 @@
 		if(numberOfTranferRuning>0)
 			ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("skipped because already inode = 0 and transfer is running: %1").arg(currentActionToDoInode.folder.absoluteFilePath()));
 		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("launch rmpath: %1").arg(currentActionToDoInode.folder.absoluteFilePath()));
-		rmPathQueue.addPath(currentActionToDoInode.folder.absoluteFilePath());
+		rmPathQueue.addPath(currentActionToDoInode.folder.absoluteFilePath(),false);
 		currentActionToDoInode.isRunning=true;
 		numberOfInodeOperation++;
 		if(numberOfInodeOperation>=ULTRACOPIER_PLUGIN_MAXPARALLELINODEOPT)
diff -U 3 -H -d -r -N -- Ultracopier-0.3/RmPath.cpp Rsync/RmPath.cpp
--- Ultracopier-0.3/RmPath.cpp	2012-06-29 22:37:41.715716675 +0200
+++ Rsync/RmPath.cpp	2012-06-29 22:42:25.105711780 +0200
@@ -16,12 +16,12 @@
 	wait();
 }
 
-void RmPath::addPath(const QString &path)
+void RmPath::addPath(const QString &path,const bool &toSync)
 {
 	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start: "+path);
 	if(stopIt)
 		return;
-	emit internalStartAddPath(path);
+	emit internalStartAddPath(path,toSync);
 }
 
 void RmPath::skip()
@@ -38,7 +38,7 @@
 
 void RmPath::run()
 {
-	connect(this,SIGNAL(internalStartAddPath(QString)),this,SLOT(internalAddPath(QString)),Qt::QueuedConnection);
+	connect(this,SIGNAL(internalStartAddPath(QString,bool)),this,SLOT(internalAddPath(QString,bool)),Qt::QueuedConnection);
 	connect(this,SIGNAL(internalStartDoThisPath()),this,SLOT(internalDoThisPath()),Qt::QueuedConnection);
 	connect(this,SIGNAL(internalStartSkip()),this,SLOT(internalSkip()),Qt::QueuedConnection);
 	connect(this,SIGNAL(internalStartRetry()),this,SLOT(internalRetry()),Qt::QueuedConnection);
@@ -50,23 +50,63 @@
 	if(waitAction || pathList.isEmpty())
 		return;
 	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start: "+pathList.first());
-	if(!rmpath(pathList.first()))
+	if(!toSyncList.first())
 	{
-		if(stopIt)
+		if(!rmpath(pathList.first(),false))
+		{
+			if(stopIt)
+				return;
+			waitAction=true;
+			ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the folder: "+pathList.first());
+			emit errorOnFolder(pathList.first(),tr("Unable to remove the folder"));
 			return;
-		waitAction=true;
-		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the folder: "+pathList.first());
-		emit errorOnFolder(pathList.first(),tr("Unable to remove the folder"));
-		return;
+		}
+	}
+	else
+	{
+		if(QFileInfo(pathList.first()).isDir())
+		{
+			if(!rmpath(pathList.first(),true))
+			{
+				if(stopIt)
+					return;
+				waitAction=true;
+				ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the folder: "+pathList.first());
+				emit errorOnFolder(pathList.first(),tr("Unable to remove the folder"));
+				return;
+			}
+		}
+		else if(!rmfile(pathList.first()))
+		{
+			if(stopIt)
+				return;
+			waitAction=true;
+			ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Unable to remove the file: "+pathList.first());
+			emit errorOnFolder(pathList.first(),tr("Unable to remove the file"));
+			return;
+		}
 	}
 	pathList.removeFirst();
+	toSyncList.removeFirst();
 	emit firstFolderFinish();
 	checkIfCanDoTheNext();
 }
 
+bool RmPath::rmfile(QString filePath)
+{
+	QFile file(filePath);
+	if(!file.remove())
+	{
+		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"unable to remove the file: "+file.fileName()+", error: "+file.errorString());
+		return false;
+	}
+	else
+		return true;
+}
+
 /** remplace QDir::rmpath() because it return false if the folder not exists
   and seam bug with parent folder */
-bool RmPath::rmpath(const QDir &dir)
+bool RmPath::rmpath(const QDir &dir,const bool &toSync)
 {
 	if(!dir.exists())
 		return true;
@@ -77,28 +117,40 @@
 		QFileInfo fileInfo(list.at(i));
 		if(!fileInfo.isDir())
 		{
-			ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"found a file: "+fileInfo.fileName());
-			allHaveWork=false;
+			if(toSync)
+			{
+				if(!rmfile(fileInfo.absoluteFilePath()))
+				{
+					ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"unable to remove a file: "+fileInfo.fileName());
+					allHaveWork=false;
+				}
+			}
+			else
+			{
+				ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"found a file: "+fileInfo.fileName());
+				allHaveWork=false;
+			}
 		}
 		else
 		{
 			//return the fonction for scan the new folder
-			if(!rmpath(dir.absolutePath()+'/'+fileInfo.fileName()+'/'))
+			if(!rmpath(dir.absolutePath()+'/'+fileInfo.fileName()+'/',toSync))
 				allHaveWork=false;
 		}
 	}
 	if(!allHaveWork)
-		return allHaveWork;
+		return false;
 	allHaveWork=dir.rmdir(dir.absolutePath());
 	if(!allHaveWork)
 		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"unable to remove the folder: "+dir.absolutePath());
 	return allHaveWork;
 }
 
-void RmPath::internalAddPath(const QString &path)
+void RmPath::internalAddPath(const QString &path,const bool &toSync)
 {
 	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start: "+path);
 	pathList << path;
+	toSyncList << toSync;
 	if(!waitAction)
 		checkIfCanDoTheNext();
 }
diff -U 3 -H -d -r -N -- Ultracopier-0.3/RmPath.h Rsync/RmPath.h
--- Ultracopier-0.3/RmPath.h	2012-03-19 17:34:43.572371290 +0100
+++ Rsync/RmPath.h	2012-06-29 22:36:02.135718395 +0200
@@ -24,11 +24,11 @@
 	explicit RmPath();
 	~RmPath();
 	/// \brief add new path to remove
-	void addPath(const QString &path);
+	void addPath(const QString &path,const bool &toSync);
 signals:
 	void errorOnFolder(const QFileInfo &,const QString &);
 	void firstFolderFinish();
-	void internalStartAddPath(const QString &path);
+	void internalStartAddPath(const QString &path,const bool &toSync);
 	void internalStartDoThisPath();
 	void internalStartSkip();
 	void internalStartRetry();
@@ -42,12 +42,14 @@
 	bool stopIt;
 	bool skipIt;
 	QStringList pathList;
+	QList<bool> toSyncList;
 	void checkIfCanDoTheNext();
 	QDir dir;
-	bool rmpath(const QDir &dir);
+	bool rmpath(const QDir &dir,const bool &toSync);
+	bool rmfile(QString filePath);
 private slots:
 	void internalDoThisPath();
-	void internalAddPath(const QString &path);
+	void internalAddPath(const QString &path,const bool &toSync);
 	void internalSkip();
 	void internalRetry();
 };
diff -U 3 -H -d -r -N -- Ultracopier-0.3/TransferThread.cpp Rsync/TransferThread.cpp
--- Ultracopier-0.3/TransferThread.cpp	2012-06-29 15:58:31.546130402 +0200
+++ Rsync/TransferThread.cpp	2012-06-29 18:58:24.095943961 +0200
@@ -26,6 +26,7 @@
 	alwaysDoFileExistsAction= FileExists_NotSet;
 	readError		= false;
 	writeError		= false;
+	rsync			= false;
 	this->mkpathTransfer	= mkpathTransfer;
 	readThread.setWriteThread(&writeThread);
 
@@ -278,7 +279,7 @@
 {
 	//check if destination exists
 	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"["+QString::number(id)+"] overwrite: "+QString::number(fileExistsAction)+", always action: "+QString::number(alwaysDoFileExistsAction));
-	if(alwaysDoFileExistsAction==FileExists_Overwrite || readError || writeError)
+	if(alwaysDoFileExistsAction==FileExists_Overwrite || rsync || readError || writeError)
 		return false;
 	if(destinationInfo.exists())
 	{
@@ -1124,6 +1125,12 @@
 	emit tryPutAtBottom();
 }
 
+/// \brief set rsync
+void TransferThread::setRsync(const bool rsync)
+{
+	this->rsync=rsync;
+}
+
 void TransferThread::set_osBufferLimit(unsigned int osBufferLimit)
 {
 	this->osBufferLimit=osBufferLimit;
diff -U 3 -H -d -r -N -- Ultracopier-0.3/TransferThread.h Rsync/TransferThread.h
--- Ultracopier-0.3/TransferThread.h	2012-06-26 11:10:54.541994070 +0200
+++ Rsync/TransferThread.h	2012-06-29 15:54:29.286134585 +0200
@@ -113,6 +113,8 @@
 	qint64 copiedSize();
 	/// \brief put the current file at bottom
 	void putAtBottom();
+	/// \brief set rsync
+	void setRsync(const bool rsync);
 
 	void set_osBufferLimit(unsigned int osBufferLimit);
 	void setRenamingRules(QString firstRenamingRule,QString otherRenamingRule);
@@ -166,6 +168,7 @@
 	bool			readIsClosedVariable;
 	bool			writeIsClosedVariable;
 	bool			canBeMovedDirectlyVariable;
+	bool			rsync;
 	QByteArray		sourceChecksum,destinationChecksum;
 	volatile bool		stopIt;
 	volatile bool		canStartTransfer;
diff -U 3 -H -d -r -N -- Ultracopier-0.3/copyEngine.cpp Rsync/copyEngine.cpp
--- Ultracopier-0.3/copyEngine.cpp	2012-06-26 14:14:40.892116001 +0200
+++ Rsync/copyEngine.cpp	2012-06-29 21:22:50.945794251 +0200
@@ -186,6 +186,7 @@
 	connect(ui->keepDate,		SIGNAL(toggled(bool)),		&threadOfTheTransfer,	SLOT(setKeepDate(bool)));
 	connect(ui->blockSize,		SIGNAL(valueChanged(int)),	&threadOfTheTransfer,	SLOT(setBlockSize(int)));*/
 	connect(ui->autoStart,		SIGNAL(toggled(bool)),		this,			SLOT(setAutoStart(bool)));
+	connect(ui->rsync,		SIGNAL(toggled(bool)),		this,			SLOT(setRsync(bool)));
 	connect(ui->checkBoxDestinationFolderExists,	SIGNAL(toggled(bool)),		this,			SLOT(setCheckDestinationFolderExists(bool)));
 	uiIsInstalled=true;
 	setRightTransfer(doRightTransfer);
@@ -193,6 +194,7 @@
 	setSpeedLimitation(maxSpeed);
 	setBlockSize(blockSize);
 	setAutoStart(autoStart);
+	setRsync(rsync);
 	setCheckDestinationFolderExists(checkDestinationFolderExists);
 	set_doChecksum(doChecksum);
 	set_checksumIgnoreIfImpossible(checksumIgnoreIfImpossible);
@@ -216,6 +218,7 @@
 		connect(ui->keepDate,			SIGNAL(toggled(bool)),		this,SLOT(setKeepDate(bool)));
 		connect(ui->blockSize,			SIGNAL(valueChanged(int)),	this,SLOT(setBlockSize(int)));
 		connect(ui->autoStart,			SIGNAL(toggled(bool)),		this,SLOT(setAutoStart(bool)));
+		connect(ui->rsync,			SIGNAL(toggled(bool)),		this,SLOT(setRsync(bool)));
 		connect(ui->doChecksum,			SIGNAL(toggled(bool)),		this,SLOT(doChecksum_toggled(bool)));
 		connect(ui->checksumIgnoreIfImpossible,	SIGNAL(toggled(bool)),		this,SLOT(checksumIgnoreIfImpossible_toggled(bool)));
 		connect(ui->checksumOnlyOnError,	SIGNAL(toggled(bool)),		this,SLOT(checksumOnlyOnError_toggled(bool)));
@@ -505,6 +508,13 @@
 /** \brief give the forced mode, to export/import transfer list */
 void copyEngine::forceMode(const CopyMode &mode)
 {
+	if(mode==Move)
+	{
+		listThread->setRsync(false);
+		rsync=false;
+	}
+	if(uiIsInstalled)
+		ui->rsync->setEnabled(mode==Copy);
 	if(forcedMode)
 	{
 		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("Mode forced previously"));
@@ -617,6 +627,19 @@
 	listThread->setAutoStart(autoStart);
 }
 
+/// \brief set rsync
+void copyEngine::setRsync(const bool rsync)
+{
+	this->rsync=rsync;
+	if(uiIsInstalled)
+	{
+		ui->rsync->setChecked(rsync);
+		ui->rsync->setEnabled(forcedMode && mode==Copy);
+		ui->label_rsync->setEnabled(forcedMode && mode==Copy);
+	}
+	listThread->setRsync(rsync);
+}
+
 //set check destination folder
 void copyEngine::setCheckDestinationFolderExists(const bool checkDestinationFolderExists)
 {
diff -U 3 -H -d -r -N -- Ultracopier-0.3/copyEngine.h Rsync/copyEngine.h
--- Ultracopier-0.3/copyEngine.h	2012-06-25 16:50:12.191263770 +0200
+++ Rsync/copyEngine.h	2012-06-29 15:49:45.856139485 +0200
@@ -60,6 +60,7 @@
 	bool				keepDate;
 	int				blockSize;
 	bool				autoStart;
+	bool				rsync;
 	bool				checkDestinationFolderExists;
 	FileExistsAction		alwaysDoThisActionForFileExists;
 	FileErrorAction			alwaysDoThisActionForFileError;
@@ -273,6 +274,8 @@
 	void setBlockSize(const int blockSize);
 	/// \brief set auto start
 	void setAutoStart(const bool autoStart);
+	/// \brief set rsync
+	void setRsync(const bool rsync);
 	/// \brief set if need check if the destination folder exists
 	void setCheckDestinationFolderExists(const bool checkDestinationFolderExists);
 	/// \brief reset widget
diff -U 3 -H -d -r -N -- Ultracopier-0.3/copyEngine.pro.user Rsync/copyEngine.pro.user
--- Ultracopier-0.3/copyEngine.pro.user	2012-06-26 15:50:53.722179836 +0200
+++ Rsync/copyEngine.pro.user	2012-06-29 22:42:24.025711798 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.5.0, 2012-06-26T15:50:53. -->
+<!-- Written by Qt Creator 2.5.0, 2012-06-29T22:42:24. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -163,7 +163,113 @@
     <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">2</value>
     <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
    </valuemap>
-   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:{d6ee78f7-3364-4f54-a93f-b3c1e2a8c8c9}</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.0.0 (qt-everywhere-opensource-src-5.0.0) Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/user/Desktop/ultracopier/sources/plugins/CopyEngine/copyEngine-build-desktop-Qt_5_0_0__qt-everywhere-opensource-src-5_0_0__Release</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">3</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
+    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:{d6ee78f7-3364-4f54-a93f-b3c1e2a8c8c9}</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.0.0 (qt-everywhere-opensource-src-5.0.0) Debug</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/user/Desktop/ultracopier/sources/plugins/CopyEngine/copyEngine-build-desktop-Qt_5_0_0__qt-everywhere-opensource-src-5_0_0__Debug</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">3</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">4</value>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
diff -U 3 -H -d -r -N -- Ultracopier-0.3/factory.cpp Rsync/factory.cpp
--- Ultracopier-0.3/factory.cpp	2012-06-26 14:10:39.972113336 +0200
+++ Rsync/factory.cpp	2012-06-29 15:40:43.606148853 +0200
@@ -35,6 +35,7 @@
 	connect(ui->keepDate,			SIGNAL(toggled(bool)),		this,SLOT(setKeepDate(bool)));
 	connect(ui->blockSize,			SIGNAL(valueChanged(int)),	this,SLOT(setBlockSize(int)));
 	connect(ui->autoStart,			SIGNAL(toggled(bool)),		this,SLOT(setAutoStart(bool)));
+	connect(ui->rsync,			SIGNAL(toggled(bool)),		this,SLOT(setRsync(bool)));
 	connect(ui->doChecksum,			SIGNAL(toggled(bool)),		this,SLOT(doChecksum_toggled(bool)));
 	connect(ui->checksumIgnoreIfImpossible,	SIGNAL(toggled(bool)),		this,SLOT(checksumIgnoreIfImpossible_toggled(bool)));
 	connect(ui->checksumOnlyOnError,	SIGNAL(toggled(bool)),		this,SLOT(checksumOnlyOnError_toggled(bool)));
@@ -71,6 +72,7 @@
 	realObject->setKeepDate(		optionsEngine->getOptionValue("keepDate").toBool());
 	realObject->setBlockSize(		optionsEngine->getOptionValue("blockSize").toInt());
 	realObject->setAutoStart(		optionsEngine->getOptionValue("autoStart").toBool());
+	realObject->setRsync(			optionsEngine->getOptionValue("rsync").toBool());
 	realObject->on_comboBoxFolderColision_currentIndexChanged(ui->comboBoxFolderColision->currentIndex());
 	realObject->on_comboBoxFolderError_currentIndexChanged(ui->comboBoxFolderError->currentIndex());
 	realObject->setCheckDestinationFolderExists(	optionsEngine->getOptionValue("checkDestinationFolder").toBool());
@@ -123,6 +125,7 @@
 		KeysList.append(qMakePair(QString("keepDate"),QVariant(true)));
 		KeysList.append(qMakePair(QString("blockSize"),QVariant(1024)));//1024KB as default
 		KeysList.append(qMakePair(QString("autoStart"),QVariant(true)));
+		KeysList.append(qMakePair(QString("rsync"),QVariant(true)));
 		KeysList.append(qMakePair(QString("folderError"),QVariant(0)));
 		KeysList.append(qMakePair(QString("folderColision"),QVariant(0)));
 		KeysList.append(qMakePair(QString("checkDestinationFolder"),QVariant(true)));
@@ -151,6 +154,7 @@
 		ui->keepDate->setChecked(optionsEngine->getOptionValue("keepDate").toBool());
 		ui->blockSize->setValue(optionsEngine->getOptionValue("blockSize").toUInt());
 		ui->autoStart->setChecked(optionsEngine->getOptionValue("autoStart").toBool());
+		ui->rsync->setChecked(optionsEngine->getOptionValue("rsync").toBool());
 		ui->comboBoxFolderError->setCurrentIndex(optionsEngine->getOptionValue("folderError").toUInt());
 		ui->comboBoxFolderColision->setCurrentIndex(optionsEngine->getOptionValue("folderColision").toUInt());
 		ui->checkBoxDestinationFolderExists->setChecked(optionsEngine->getOptionValue("checkDestinationFolder").toBool());
@@ -287,6 +291,15 @@
 	else
 		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"internal error, crash prevented");
 }
+
+void Factory::setRsync(bool rsync)
+{
+	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"the checkbox have changed");
+	if(optionsEngine!=NULL)
+		optionsEngine->setOptionValue("rsync",rsync);
+	else
+		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"internal error, crash prevented");
+}
 
 void Factory::newLanguageLoaded()
 {
diff -U 3 -H -d -r -N -- Ultracopier-0.3/factory.h Rsync/factory.h
--- Ultracopier-0.3/factory.h	2012-05-19 15:44:05.354039716 +0200
+++ Rsync/factory.h	2012-06-29 15:40:20.016149261 +0200
@@ -71,6 +71,7 @@
 	void setKeepDate(bool keepDate);
 	void setBlockSize(int blockSize);
 	void setAutoStart(bool autoStart);
+	void setRsync(bool rsync);
 	void showFilterDialog();
 	void sendNewFilters(QStringList includeStrings,QStringList includeOptions,QStringList excludeStrings,QStringList excludeOptions);
 	void doChecksum_toggled(bool);
diff -U 3 -H -d -r -N -- Ultracopier-0.3/informations.xml Rsync/informations.xml
--- Ultracopier-0.3/informations.xml	2012-06-25 17:31:49.331291383 +0200
+++ Rsync/informations.xml	2012-06-29 15:11:53.696178734 +0200
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <package>
-	<title xml:lang="en"><![CDATA[Copy engine of Ultracopier 0.3]]></title><!-- english is required -->
-	<title xml:lang="fr"><![CDATA[Moteur de copie d'ultracopier 0.3]]></title>
+	<title xml:lang="en"><![CDATA[Rsync copy engine]]></title><!-- english is required -->
+	<title xml:lang="fr"><![CDATA[Moteur de copie rsync]]></title>
 	<!-- What kind of plugin this is -->
 	<category>CopyEngine</category>
 	<!-- Who wrote this plugin -->
@@ -14,12 +14,12 @@
 	<!-- the architecture code of this plugin, found PlatformMacro.h into ultracopier source -->
 	<architecture>linux-x86_64-pc</architecture>
 	<!-- Detailed description -->
-	<description xml:lang="en"><![CDATA[Copy engine of Ultracopier 0.3, do in Qt for all platform, and copy by stream]]></description>
-	<description xml:lang="fr"><![CDATA[Moteur de copie d'ultracopier 0.3, fait en Qt pour toutes les plateformes, et copie par stream]]></description>
+	<description xml:lang="en"><![CDATA[Rsync copy engine, variant of the official copy engine to provide simple way to do backups]]></description>
+	<description xml:lang="fr"><![CDATA[Moteur de copie rsync, variante du moteur de copie officiel pour fournir une maniére simple de faire des backups]]></description>
 	<!-- Version of this release of this plugin, need be like that's: A.B.C.D, where A, B, C and D is number -->
 	<version>0.3.0.10</version>
 	<!-- This internal name should never change, because it is used to detect when a particular plugin is updated. It must comprise only lower case ASCII characters (a-z), numerical digits (0-9), "-", "." or "_", and it must be be unique within the category. And have size lower than 64 char. -->
-	<name>Ultracopier-0.3</name>
+	<name>Rsync</name>
 	<!-- Dependency checking. This is used to check when a plugin may not be compatible with an updated version of either Ultracopier or another plugin. This example only checks Ultracopier. -->
 	<dependencies><![CDATA[
 	>=ultracopier-0.3.0.10
diff -U 3 -H -d -r -N -- Ultracopier-0.3/options.ui Rsync/options.ui
--- Ultracopier-0.3/options.ui	2012-06-20 14:56:21.509908805 +0200
+++ Rsync/options.ui	2012-06-29 22:15:47.595739375 +0200
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>356</width>
-    <height>376</height>
+    <width>354</width>
+    <height>399</height>
    </rect>
   </property>
   <layout class="QGridLayout" name="gridLayout">
@@ -122,7 +122,7 @@
    <item row="6" column="2">
     <widget class="QCheckBox" name="checkBoxDestinationFolderExists"/>
    </item>
-   <item row="7" column="0" colspan="3">
+   <item row="8" column="0" colspan="3">
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
       <string>Checksum</string>
@@ -175,24 +175,24 @@
      </layout>
     </widget>
    </item>
-   <item row="8" column="1">
+   <item row="9" column="1">
     <widget class="QLabel" name="label_3">
      <property name="text">
       <string>Enable OS buffer</string>
      </property>
     </widget>
    </item>
-   <item row="8" column="2">
+   <item row="9" column="2">
     <widget class="QCheckBox" name="osBuffer"/>
    </item>
-   <item row="9" column="0" colspan="2">
+   <item row="10" column="0" colspan="2">
     <widget class="QCheckBox" name="osBufferLimited">
      <property name="text">
       <string>OS buffer only if smaller than</string>
      </property>
     </widget>
    </item>
-   <item row="9" column="2">
+   <item row="10" column="2">
     <widget class="QSpinBox" name="osBufferLimit">
      <property name="suffix">
       <string>KB</string>
@@ -215,7 +215,7 @@
      </property>
     </widget>
    </item>
-   <item row="12" column="1">
+   <item row="13" column="1">
     <spacer name="verticalSpacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
@@ -228,20 +228,34 @@
      </property>
     </spacer>
    </item>
-   <item row="11" column="1">
+   <item row="12" column="1">
     <widget class="QPushButton" name="filters">
      <property name="text">
       <string>Filters</string>
      </property>
     </widget>
    </item>
-   <item row="10" column="1">
+   <item row="11" column="1">
     <widget class="QPushButton" name="renamingRules">
      <property name="text">
       <string>Renaming rules</string>
      </property>
     </widget>
    </item>
+   <item row="7" column="2">
+    <widget class="QCheckBox" name="rsync">
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="7" column="0" colspan="2">
+    <widget class="QLabel" name="label_rsync">
+     <property name="text">
+      <string>Rsync (only in copy mode)</string>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources/>
diff -U 3 -H -d -r -N -- Ultracopier-0.3/scanFileOrFolder.cpp Rsync/scanFileOrFolder.cpp
--- Ultracopier-0.3/scanFileOrFolder.cpp	2012-05-23 11:06:25.001037392 +0200
+++ Rsync/scanFileOrFolder.cpp	2012-06-29 21:54:15.555761695 +0200
@@ -1,9 +1,10 @@
 #include "scanFileOrFolder.h"
 
-#include <QMessageBox>
+#include <QDateTime>
 
 scanFileOrFolder::scanFileOrFolder(CopyMode mode)
 {
+	rsync=false;
 	stopped	= true;
 	stopIt	= false;
 	this->mode=mode;
@@ -427,7 +428,17 @@
 					if(!included)
 					{}
 					else
-						emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileName,mode);
+					{
+						bool sendToTransfer=false;
+						if(!rsync)
+							sendToTransfer=true;
+						else if(!QFile::exists(finalDest+fileName))
+							sendToTransfer=true;
+						else if(fileInfo.lastModified()!=QFileInfo(finalDest+fileName).lastModified())
+							sendToTransfer=true;
+						if(sendToTransfer)
+							emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileName,mode);
+					}
 				}
 			}
 		}
@@ -437,9 +448,43 @@
 				//listFolder(source,destination,suffixPath+fileInfo.fileName()+QDir::separator());
 				listFolder(source,destination,sourceSuffixPath+fileInfo.fileName()+"/",destinationSuffixPath+fileInfo.fileName()+"/");//put unix separator because it's transformed into that's under windows too
 			else
-				emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileInfo.fileName(),mode);
+			{
+				bool sendToTransfer=false;
+				if(!rsync)
+					sendToTransfer=true;
+				else if(!QFile::exists(finalDest+fileInfo.fileName()))
+					sendToTransfer=true;
+				else if(fileInfo.lastModified()!=QFileInfo(finalDest+fileInfo.fileName()).lastModified())
+					sendToTransfer=true;
+				if(sendToTransfer)
+					emit fileTransfer(fileInfo.absoluteFilePath(),finalDest+fileInfo.fileName(),mode);
+			}
 		}
 	}
+	if(rsync)
+	{
+		//check the reverse path here
+		QFileInfoList entryListDestination=QDir(finalDest).entryInfoList(QDir::AllEntries|QDir::NoDotAndDotDot|QDir::Hidden|QDir::System,QDir::DirsFirst|QDir::Name|QDir::IgnoreCase);//possible wait time here
+		int sizeEntryListDestination=entryListDestination.size();
+		int index=0;
+		for (int indexDestination=0;indexDestination<sizeEntryListDestination;++indexDestination)
+		{
+			index=0;
+			while(index<sizeEntryList)
+			{
+				if(entryListDestination.at(indexDestination).fileName()==entryList.at(index).fileName())
+					break;
+				index++;
+			}
+			if(index==sizeEntryList)
+			{
+				//then not found, need be remove
+				emit addToRmForRsync(finalDest+entryListDestination.at(indexDestination).fileName());
+			}
+		}
+		return;
+	}
+
 	if(mode==Move)
 	{
 		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"newSource: "+newSource+", sizeEntryList: "+QString::number(sizeEntryList));
@@ -458,3 +503,9 @@
 	this->firstRenamingRule=firstRenamingRule;
 	this->otherRenamingRule=otherRenamingRule;
 }
+
+/// \brief set rsync
+void scanFileOrFolder::setRsync(const bool rsync)
+{
+	this->rsync=rsync;
+}
diff -U 3 -H -d -r -N -- Ultracopier-0.3/scanFileOrFolder.h Rsync/scanFileOrFolder.h
--- Ultracopier-0.3/scanFileOrFolder.h	2012-05-20 20:32:43.695874620 +0200
+++ Rsync/scanFileOrFolder.h	2012-06-29 21:51:45.235764294 +0200
@@ -38,6 +38,8 @@
 	/// \brief set if need check if the destination exists
 	void setCheckDestinationFolderExists(const bool checkDestinationFolderExists);
 	void setRenamingRules(QString firstRenamingRule,QString otherRenamingRule);
+	/// \brief set rsync
+	void setRsync(const bool rsync);
 signals:
 	void fileTransfer(const QFileInfo &source,const QFileInfo &destination,const CopyMode &mode);
 	/// \brief To debug source
@@ -49,6 +51,7 @@
 	void newFolderListing(const QString &path);
 	void addToMkPath(const QString& folder);
 	void addToRmPath(const QString& folder,const int& inodeToRemove);
+	void addToRmForRsync(const QString& inode);
 public slots:
 	void addToList(const QStringList& sources,const QString& destination);
 	void setFilters(QList<Filters_rules> include,QList<Filters_rules> exclude);
@@ -69,6 +72,7 @@
 	QString			prefix;
 	QString			suffix;
 	CopyMode		mode;
+	bool			rsync;
 	QList<Filters_rules>	include,exclude;
 	QList<Filters_rules>	include_send,exclude_send;
 	bool			reloadTheNewFilters;