mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 09:36:48 +01:00
Fix last modified time when pushing a local file
This commit is contained in:
parent
f738b9f86c
commit
fedca18ae1
@ -5,6 +5,7 @@ import se.vidstige.jadb.managers.Bash;
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class JadbDevice {
|
public class JadbDevice {
|
||||||
@SuppressWarnings("squid:S00115")
|
@SuppressWarnings("squid:S00115")
|
||||||
@ -199,7 +200,7 @@ public class JadbDevice {
|
|||||||
|
|
||||||
public void push(File local, RemoteFile remote) throws IOException, JadbException {
|
public void push(File local, RemoteFile remote) throws IOException, JadbException {
|
||||||
try (FileInputStream fileStream = new FileInputStream(local)) {
|
try (FileInputStream fileStream = new FileInputStream(local)) {
|
||||||
push(fileStream, local.lastModified(), DEFAULT_MODE, remote);
|
push(fileStream, TimeUnit.MILLISECONDS.toSeconds(local.lastModified()), DEFAULT_MODE, remote);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user