mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
[199854] Fix regressions in unit tests
This commit is contained in:
parent
ad14cc2ddf
commit
128bc5d5f8
1 changed files with 16 additions and 14 deletions
|
@ -1207,6 +1207,7 @@ public class LocalFileService extends AbstractFileService implements ILocalServi
|
|||
{
|
||||
File sourceFolderOrFile = new File(srcParent, srcName);
|
||||
File targetFolder = new File(tgtParent, tgtName);
|
||||
boolean movedOk = false;
|
||||
boolean sourceIsVirtual = ArchiveHandlerManager.isVirtual(sourceFolderOrFile.getAbsolutePath());
|
||||
boolean targetIsVirtual = ArchiveHandlerManager.isVirtual(targetFolder.getAbsolutePath());
|
||||
boolean targetIsArchive = ArchiveHandlerManager.getInstance().isArchive(targetFolder);
|
||||
|
@ -1219,16 +1220,16 @@ public class LocalFileService extends AbstractFileService implements ILocalServi
|
|||
{
|
||||
File fileToMove = new File(srcParent, srcName);
|
||||
File newFile = new File(tgtParent, tgtName);
|
||||
fileToMove.renameTo(newFile);
|
||||
return;
|
||||
//Try plain Java Filesystem move first
|
||||
movedOk = fileToMove.renameTo(newFile);
|
||||
}
|
||||
|
||||
copy(srcParent, srcName, tgtParent, tgtName, monitor);
|
||||
try
|
||||
if (!movedOk)
|
||||
{
|
||||
copy(srcParent, srcName, tgtParent, tgtName, monitor);
|
||||
try {
|
||||
delete(srcParent, srcName, monitor);
|
||||
}
|
||||
catch (SystemMessageException exc)
|
||||
} catch (SystemMessageException exc)
|
||||
{
|
||||
if (monitor.isCanceled())
|
||||
{
|
||||
|
@ -1240,6 +1241,7 @@ public class LocalFileService extends AbstractFileService implements ILocalServi
|
|||
throw exc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue