File tree Expand file tree Collapse file tree
src/main/java/org/variantsync/diffdetective/diff/difftree/serialize/treeformat Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .variantsync .diffdetective .diff .difftree .serialize .treeformat ;
22
3+ import org .apache .commons .io .FilenameUtils ;
34import org .variantsync .diffdetective .diff .CommitDiff ;
45import org .variantsync .diffdetective .diff .PatchDiff ;
56import org .variantsync .diffdetective .diff .difftree .CommitDiffDiffTreeSource ;
@@ -32,10 +33,10 @@ public DiffTreeSource fromLabel(final String label) {
3233 public String toLabel (final DiffTreeSource diffTreeSource ) {
3334 if (diffTreeSource instanceof CommitDiffDiffTreeSource commitDiffDiffTreeSource ) {
3435 // write for instances of CommitDiffDiffTreeSources
35- return commitDiffDiffTreeSource .getFileName () + LineGraphConstants .TREE_NAME_SEPARATOR + commitDiffDiffTreeSource .getCommitHash ();
36+ return FilenameUtils . separatorsToUnix ( commitDiffDiffTreeSource .getFileName (). toString () ) + LineGraphConstants .TREE_NAME_SEPARATOR + commitDiffDiffTreeSource .getCommitHash ();
3637 } else if (diffTreeSource instanceof PatchDiff patchDiff ) {
3738 // write for instances of PatchDiffs
38- return patchDiff .getFileName () + LineGraphConstants .TREE_NAME_SEPARATOR + patchDiff .getCommitDiff ().getCommitHash ();
39+ return FilenameUtils . separatorsToUnix ( patchDiff .getFileName () ) + LineGraphConstants .TREE_NAME_SEPARATOR + patchDiff .getCommitDiff ().getCommitHash ();
3940 } else {
4041 throw new UnsupportedOperationException ("There is no implementation for this DiffTreeSource type: " + diffTreeSource );
4142 }
You can’t perform that action at this time.
0 commit comments