diff options
author | Manuel Bentele | 2022-02-03 12:07:14 +0100 |
---|---|---|
committer | Manuel Bentele | 2022-02-03 12:07:14 +0100 |
commit | 1d999c8f6b3304432512028a9a943e4b55ccf92f (patch) | |
tree | a6eb2b8bdce5c354577b762abc36ef3257595c3e | |
parent | Fix path separator for resource URLs on Windows platforms (diff) | |
download | master-sync-shared-1d999c8f6b3304432512028a9a943e4b55ccf92f.tar.gz master-sync-shared-1d999c8f6b3304432512028a9a943e4b55ccf92f.tar.xz master-sync-shared-1d999c8f6b3304432512028a9a943e4b55ccf92f.zip |
Fix resource path for disk tests on Windows platforms
-rw-r--r-- | src/test/java/org/openslx/virtualization/disk/DiskImageTestResources.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/java/org/openslx/virtualization/disk/DiskImageTestResources.java b/src/test/java/org/openslx/virtualization/disk/DiskImageTestResources.java index ab97bbd..0b283a7 100644 --- a/src/test/java/org/openslx/virtualization/disk/DiskImageTestResources.java +++ b/src/test/java/org/openslx/virtualization/disk/DiskImageTestResources.java @@ -3,13 +3,15 @@ package org.openslx.virtualization.disk; import java.io.File; import java.net.URL; +import org.openslx.util.Resources; + public class DiskImageTestResources { - private static final String DISK_PREFIX_PATH = File.separator + "disk"; + private static final String DISK_PREFIX_PATH = Resources.PATH_SEPARATOR + "disk"; public static File getDiskFile( String diskFileName ) { - String diskPath = DiskImageTestResources.DISK_PREFIX_PATH + File.separator + diskFileName; + String diskPath = DiskImageTestResources.DISK_PREFIX_PATH + Resources.PATH_SEPARATOR + diskFileName; URL disk = DiskImageTestResources.class.getResource( diskPath ); return new File( disk.getFile() ); } |