Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/magnusja/libaums into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
magnusja committed Apr 11, 2019
2 parents 020e4eb + 0f6fa73 commit a56398d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 10 deletions.
23 changes: 21 additions & 2 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
<!---
PLEASE NOTE:
Before creating an issue, please think about wheter you are really reporting an issue or just have a question/problem. The latter are better suited for Stackoverflow or gitter (https://gitter.im/libaums). The best approach for a question or problem regarding libaums is to ask on Stackoverflow and hint me to the question via gitter!

If you are sure that you would like to open an issue, please delete all of this message and continue.
Thank you!
-->

### Problem


### Expected behavior


### Actual behavior


#### Stacktrace of Excpetion

```
(if exists)
```


### Code where problem occurs

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.3.2'

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.3'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'

classpath 'org.codehaus.groovy:groovy-all:2.4.15'

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
2 changes: 1 addition & 1 deletion libaums/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies {
testImplementation 'org.apache.commons:commons-io:1.3.2'
testImplementation 'com.eclipsesource.minimal-json:minimal-json:0.9.4'
testImplementation 'org.xenei:junit-contracts:0.1.7'
testImplementation 'org.mockito:mockito-core:2.7.22'
testImplementation 'org.mockito:mockito-core:2.24.5'

api 'androidx.annotation:annotation:1.0.0-beta01'
javadocDeps 'androidx.annotation:annotation:1.0.0-beta01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public FileBlockDeviceDriver(File file) throws FileNotFoundException {
public FileBlockDeviceDriver(URL url, int blockSize, int byteOffset) throws IOException {
this.byteOffset = byteOffset;
ReadableByteChannel rbc = Channels.newChannel(url.openStream());
File tempFile = File.createTempFile("blockdevice", "bin");
File tempFile = File.createTempFile("libaums_file_blockdevice", ".bin");
tempFile.deleteOnExit();
FileOutputStream fos = new FileOutputStream(tempFile);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public class FAT {
lastOffset = offset;
}

currentCluster = buffer.getInt((int) offsetInBlock);
currentCluster = buffer.getInt((int) offsetInBlock) & 0x0FFFFFFF;
} while (currentCluster < FAT32_EOF_CLUSTER);

return result.toArray(new Long[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public Fat32FileSystemProducer(String jsonUrl, String imageUrl) {

URL url = new URL(imageUrl);
ReadableByteChannel rbc = Channels.newChannel(url.openStream());
File tempFile = File.createTempFile("blockdevice", ".bin");
File tempFile = File.createTempFile("libaums_test_blockdevice", ".bin");
tempFile.deleteOnExit();
FileOutputStream fos = new FileOutputStream(tempFile);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);

Expand Down Expand Up @@ -74,7 +75,8 @@ public synchronized Pair<Fat32FileSystem, JsonObject> newInstance() {
public synchronized void cleanUp() {
try {
ReadableByteChannel rbc = Channels.newChannel(new FileInputStream(originalFile));
File tempFile = File.createTempFile("tmp_blockdevice", ".bin");
File tempFile = File.createTempFile("libaums_test_blockdevice", ".bin");
tempFile.deleteOnExit();
FileOutputStream fos = new FileOutputStream(tempFile);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);

Expand Down

0 comments on commit a56398d

Please sign in to comment.