diff options
-rw-r--r-- | org.tizen.codecoverage/src/org/tizen/codecoverage/helper/GcovHelper.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/org.tizen.codecoverage/src/org/tizen/codecoverage/helper/GcovHelper.java b/org.tizen.codecoverage/src/org/tizen/codecoverage/helper/GcovHelper.java index 9ce0dac..9283028 100644 --- a/org.tizen.codecoverage/src/org/tizen/codecoverage/helper/GcovHelper.java +++ b/org.tizen.codecoverage/src/org/tizen/codecoverage/helper/GcovHelper.java @@ -141,6 +141,23 @@ public class GcovHelper { for (String gcdaPath: gcdaPathsInGcno) { dstFile = new Path(gcdaPath).removeLastSegments(1).toString(); srcFile = targetPath + gcdaPath; + + srcFile = srcFile.replaceAll("//", "/"); + srcFile = srcFile.replaceAll("/", "'/'"); + int startPos = 0; + int endPos = srcFile.length(); + if ( srcFile.startsWith("'/") ) { + startPos += 1; + } + if ( srcFile.endsWith("/'") ) { + endPos -= 1; + } + else { + srcFile += "'"; + endPos += 1; + } + + srcFile = srcFile.substring(startPos, endPos); SyncResult syncSuccess = syncService.pull( currentDevice.getFileEntry( srcFile ), dstFile); if (syncSuccess.getCode() != RESULT_OK) { |