mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin: Fix copy of manually imported files
This commit is contained in:
+5
-1
@@ -384,7 +384,11 @@ public class FitImporter {
|
|||||||
LOG.warn("Fit file {} already exists as {}", file, exportFile);
|
LOG.warn("Fit file {} already exists as {}", file, exportFile);
|
||||||
} else {
|
} else {
|
||||||
LOG.debug("Copying {} to {}", file, exportFile);
|
LOG.debug("Copying {} to {}", file, exportFile);
|
||||||
|
final File parentFile = exportFile.getParentFile();
|
||||||
|
if (parentFile != null) {
|
||||||
|
//noinspection ResultOfMethodCallIgnored
|
||||||
|
parentFile.mkdirs();
|
||||||
|
}
|
||||||
FileUtils.copyFile(file, exportFile);
|
FileUtils.copyFile(file, exportFile);
|
||||||
//noinspection ResultOfMethodCallIgnored
|
//noinspection ResultOfMethodCallIgnored
|
||||||
exportFile.setLastModified(file.lastModified());
|
exportFile.setLastModified(file.lastModified());
|
||||||
|
|||||||
Reference in New Issue
Block a user