Lines 48-53
Link Here
|
48 |
* Martin Oberhuber (Wind River) - [235463][ftp][dstore] Incorrect case sensitivity reported on windows-remote |
48 |
* Martin Oberhuber (Wind River) - [235463][ftp][dstore] Incorrect case sensitivity reported on windows-remote |
49 |
* David McKnight (IBM) - [236039][dstore][efs] DStoreInputStream can report EOF too early - clean up how it waits for the local temp file to be created |
49 |
* David McKnight (IBM) - [236039][dstore][efs] DStoreInputStream can report EOF too early - clean up how it waits for the local temp file to be created |
50 |
* David McKnight (IBM) - [240710] [dstore] DStoreFileService.getFile() fails with NPE for valid root files |
50 |
* David McKnight (IBM) - [240710] [dstore] DStoreFileService.getFile() fails with NPE for valid root files |
|
|
51 |
* David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor |
51 |
*******************************************************************************/ |
52 |
*******************************************************************************/ |
52 |
|
53 |
|
53 |
package org.eclipse.rse.internal.services.dstore.files; |
54 |
package org.eclipse.rse.internal.services.dstore.files; |
Lines 74-79
Link Here
|
74 |
import org.eclipse.dstore.core.model.DataStore; |
75 |
import org.eclipse.dstore.core.model.DataStore; |
75 |
import org.eclipse.dstore.core.model.DataStoreAttributes; |
76 |
import org.eclipse.dstore.core.model.DataStoreAttributes; |
76 |
import org.eclipse.dstore.core.model.DataStoreResources; |
77 |
import org.eclipse.dstore.core.model.DataStoreResources; |
|
|
78 |
import org.eclipse.dstore.core.model.DataStoreSchema; |
77 |
import org.eclipse.dstore.core.model.IDataStoreProvider; |
79 |
import org.eclipse.dstore.core.model.IDataStoreProvider; |
78 |
import org.eclipse.osgi.util.NLS; |
80 |
import org.eclipse.osgi.util.NLS; |
79 |
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants; |
81 |
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants; |
Lines 457-467
Link Here
|
457 |
boolean transferSuccessful = false; |
459 |
boolean transferSuccessful = false; |
458 |
|
460 |
|
459 |
long totalBytes = file.length(); |
461 |
long totalBytes = file.length(); |
|
|
462 |
|
463 |
DataElement uploadLog = findUploadLog(); |
464 |
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile; |
465 |
|
466 |
DataStore ds = getDataStore(); |
467 |
DataElement result = ds.find(uploadLog, DE.A_NAME, remotePath,1); |
468 |
if (result == null) |
469 |
{ |
470 |
result = ds.createObject(uploadLog, "uploadstatus", remotePath); |
471 |
result.setAttribute(DE.A_SOURCE, "running"); |
472 |
result.setAttribute(DE.A_VALUE, ""); |
473 |
|
474 |
DataElement cmd = getDataStore().findCommandDescriptor(DataStoreSchema.C_SET); |
475 |
|
476 |
DataElement setstatus = ds.command(cmd, uploadLog, true); |
477 |
} |
460 |
|
478 |
|
461 |
try |
479 |
try |
462 |
{ |
480 |
{ |
463 |
String byteStreamHandlerId = getByteStreamHandlerId(); |
481 |
String byteStreamHandlerId = getByteStreamHandlerId(); |
464 |
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile; |
482 |
|
465 |
|
483 |
|
466 |
// create an empty file and append data to it later |
484 |
// create an empty file and append data to it later |
467 |
// this handles the case of uploading empty files as well |
485 |
// this handles the case of uploading empty files as well |
Lines 473-481
Link Here
|
473 |
//subMonitor = new SubProgressMonitor(monitor, (int)totalBytes); |
491 |
//subMonitor = new SubProgressMonitor(monitor, (int)totalBytes); |
474 |
} |
492 |
} |
475 |
|
493 |
|
476 |
|
|
|
477 |
// DataElement uploadLog = findUploadLog(); |
478 |
findUploadLog(); |
479 |
// listener = new FileTransferStatusListener(remotePath, shell, monitor, getConnectorService(), ds, uploadLog); |
494 |
// listener = new FileTransferStatusListener(remotePath, shell, monitor, getConnectorService(), ds, uploadLog); |
480 |
// ds.getDomainNotifier().addDomainListener(listener); |
495 |
// ds.getDomainNotifier().addDomainListener(listener); |
481 |
|
496 |
|
Lines 583-588
Link Here
|
583 |
|
598 |
|
584 |
available = bufInputStream.available(); |
599 |
available = bufInputStream.available(); |
585 |
} |
600 |
} |
|
|
601 |
|
586 |
// if (listener.uploadHasFailed()) |
602 |
// if (listener.uploadHasFailed()) |
587 |
// { |
603 |
// { |
588 |
// showUploadFailedMessage(listener, source); |
604 |
// showUploadFailedMessage(listener, source); |
Lines 639-664
Link Here
|
639 |
{ |
655 |
{ |
640 |
if (transferSuccessful) |
656 |
if (transferSuccessful) |
641 |
{ |
657 |
{ |
642 |
|
658 |
String resultStr = result.getSource(); |
643 |
|
659 |
while (!resultStr.equals("success")) |
644 |
// try |
660 |
{ |
645 |
// { |
661 |
// sleep until the upload is complete |
646 |
// listener.waitForUpdate(null, 2); |
662 |
try { |
647 |
// |
663 |
Thread.sleep(200); |
648 |
// } |
664 |
} |
649 |
// catch (InterruptedException e) |
665 |
catch (InterruptedException e){ |
650 |
// { |
666 |
} |
651 |
// UniversalSystemPlugin.logError(CLASSNAME + " InterruptedException while waiting for command", e); |
667 |
resultStr = result.getSource(); |
652 |
// } |
668 |
} |
653 |
|
|
|
654 |
} |
669 |
} |
655 |
|
|
|
656 |
//ds.getDomainNotifier().removeDomainListener(listener); |
657 |
|
658 |
// if (listener.uploadHasFailed()) |
659 |
// { |
660 |
// showUploadFailedMessage(listener, source); |
661 |
// } |
662 |
} |
670 |
} |
663 |
} |
671 |
} |
664 |
} |
672 |
} |