summaryrefslogtreecommitdiff
path: root/bin/ifuse-photos-to-tmp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-11-09 12:48:25 -0700
committerSean Whitton <spwhitton@spwhitton.name>2019-11-09 12:48:25 -0700
commite7a4352092eaccfd202d16dcbed599f3de4cf32a (patch)
tree1f4ac857ffb1e4058d14062d58d0556735aa3fb4 /bin/ifuse-photos-to-tmp
parentaabb20fa10c487ba47177570dbaf7dcecb431226 (diff)
downloaddotfiles-e7a4352092eaccfd202d16dcbed599f3de4cf32a.tar.gz
more iOS cache clearing
Diffstat (limited to 'bin/ifuse-photos-to-tmp')
-rwxr-xr-xbin/ifuse-photos-to-tmp8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/ifuse-photos-to-tmp b/bin/ifuse-photos-to-tmp
index 58568afa..961606c0 100755
--- a/bin/ifuse-photos-to-tmp
+++ b/bin/ifuse-photos-to-tmp
@@ -27,7 +27,7 @@ use DateTime::TimeZone::Local;
use DateTime::Format::Epoch;
use File::Copy;
use File::Find;
-use File::Path qw(make_path);
+use File::Path qw(make_path remove_path);
use File::Spec::Functions;
use File::stat qw(stat);
use Image::ExifTool qw(ImageInfo);
@@ -120,6 +120,12 @@ find(sub {
unlink glob "$mount/PhotoData/Photos*";
unlink "$mount/PhotoData/com.apple.photos.caches_metadata.plist";
+# iOS 13 additionally seems to require us to clear these:
+unlink glob "$mount/PhotoData/Thumbnails/*.ithmb";
+remove_tree(glob("$mount/PhotoData/Thumbnails/V2/DCIM/10*"),
+ "$mount/PhotoData/MISC");
+# (source: https://ubuntuforums.org/archive/index.php/t-2203298.html)
+
system "fusermount -u $mount";
warn "failed to unmount $mount" unless ($? == 0);