mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-11 21:43:05 +02:00
Images/folders are deleted when tracks/waypoints are deleted.
This fixes #189.
This commit is contained in:
@@ -189,7 +189,6 @@ public class KmzTrackImporter implements TrackImporter {
|
||||
|
||||
zipInputStream.closeEntry();
|
||||
}
|
||||
|
||||
return trackId;
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Unable to import file", e);
|
||||
@@ -241,16 +240,6 @@ public class KmzTrackImporter implements TrackImporter {
|
||||
ContentProviderUtils contentProviderUtils = new ContentProviderUtils(context);
|
||||
contentProviderUtils.deleteTrack(context, trackId);
|
||||
}
|
||||
|
||||
if (importTrackId != -1L) {
|
||||
File dir = FileUtils.getPhotoDir(context, importTrackId);
|
||||
if (dir.exists() && dir.isDirectory()) {
|
||||
for (File file : dir.listFiles()) {
|
||||
file.delete();
|
||||
}
|
||||
dir.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user