mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 10:05:49 +01:00
Bangle.js: clear fetched csv if refetching
This commit is contained in:
parent
6255ff615d
commit
d3229dea96
@ -761,12 +761,17 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
String line = json.getString("line");
|
||||
LOG.info(line);
|
||||
|
||||
String mode = "append";
|
||||
if (line.equals("")) {
|
||||
mode = "write";
|
||||
}
|
||||
|
||||
File outputFile = new File(dir, filename);
|
||||
String filenameLogID = "latestFetchedRecorderLog.txt";
|
||||
File outputFileLogID = new File(dir, filenameLogID);
|
||||
LOG.warn("Writing log to " + outputFile.toString());
|
||||
try {
|
||||
FileUtils.copyStringToFile(line,outputFile,"append");
|
||||
FileUtils.copyStringToFile(line,outputFile,mode);
|
||||
//GB.toast(getContext(), "Log written to " + filename, Toast.LENGTH_LONG, GB.INFO);
|
||||
|
||||
FileUtils.copyStringToFile(log,outputFileLogID,"");
|
||||
|
Loading…
Reference in New Issue
Block a user