Mercurial > hg > truffle
comparison test/testlibrary/ClassFileInstaller.java @ 10447:638387729ddf
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 20 Jun 2013 19:10:40 +0200 |
parents | 43083e670adf |
children |
comparison
equal
deleted
inserted
replaced
10446:746fa60be266 | 10447:638387729ddf |
---|---|
43 String pathName = arg.replace('.', '/').concat(".class"); | 43 String pathName = arg.replace('.', '/').concat(".class"); |
44 InputStream is = cl.getResourceAsStream(pathName); | 44 InputStream is = cl.getResourceAsStream(pathName); |
45 | 45 |
46 // Create the class file's package directory | 46 // Create the class file's package directory |
47 Path p = Paths.get(pathName); | 47 Path p = Paths.get(pathName); |
48 Files.createDirectories(p.getParent()); | 48 if (pathName.contains("/")) { |
49 Files.createDirectories(p.getParent()); | |
50 } | |
49 // Create the class file | 51 // Create the class file |
50 Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING); | 52 Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING); |
51 } | 53 } |
52 } | 54 } |
53 } | 55 } |