From 1db5920d9488c25bb51e37d504d51f6a41ae5432 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 10 Jun 2014 01:38:57 -0700 Subject: Add package installation warnings for */.DS_Store. --- MobileCydia.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MobileCydia.mm b/MobileCydia.mm index 911dd8b..0dbc42d 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -3056,6 +3056,7 @@ struct PackageNameOrdering : bool user = false; bool _private = false; bool stash = false; + bool dsstore = false; bool repository = [[self section] isEqualToString:@"Repositories"]; @@ -3069,6 +3070,8 @@ struct PackageNameOrdering : _private = true; else if (!stash && [file isEqualToString:@"/var/stash"]) stash = true; + else if (!dsstore && [file hasSuffix:@"/.DS_Store"]) + dsstore = true; /* XXX: this is not sensitive enough. only some folders are valid. */ if (cydia && !repository) @@ -3079,6 +3082,8 @@ struct PackageNameOrdering : [warnings addObject:[NSString stringWithFormat:UCLocalize("FILES_INSTALLED_TO"), @"/private"]]; if (stash) [warnings addObject:[NSString stringWithFormat:UCLocalize("FILES_INSTALLED_TO"), @"/var/stash"]]; + if (dsstore) + [warnings addObject:[NSString stringWithFormat:UCLocalize("FILES_INSTALLED_TO"), @".DS_Store"]]; } return [warnings count] == 0 ? nil : warnings; -- cgit v1.2.3