Skip to content

Commit

Permalink
Fixed crash bug when bundle path lookup for app failed. Updated docs …
Browse files Browse the repository at this point in the history
…etc. for release 2.8.1.
  • Loading branch information
sveinbjornt committed Mar 30, 2019
1 parent b2f0b33 commit a8f05ed
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Sloth is free, open source software and has been developed and maintained for a

## Download

* **[⇩ Download Sloth 2.8](https://sveinbjorn.org/files/software/sloth.zip)** (~0.7 MB, Intel 64-bit, macOS 10.8 or later)
* **[⇩ Download Sloth 2.8.1](https://sveinbjorn.org/files/software/sloth.zip)** (~0.7 MB, Intel 64-bit, macOS 10.8 or later)

Sloth can also be installed via [Homebrew](https://brew.sh):
Sloth can also be installed via [Homebrew](https://brew.sh) (may not be latest version):

```shell
$ brew cask install sloth
Expand All @@ -37,6 +37,10 @@ $ brew cask install sloth

## Version history

### 30/03/2019 - Version 2.8.1

* Fixed potential crash bug introduced in version 2.8.

### 27/03/2019 - Version 2.8

* New Dark Mode friendly template icons for Mojave
Expand Down
2 changes: 1 addition & 1 deletion resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>2.8</string>
<string>2.8.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
Expand Down
2 changes: 1 addition & 1 deletion source/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/

#define PROGRAM_NAME @"Sloth"
#define PROGRAM_VERSION @"2.8"
#define PROGRAM_VERSION @"2.8.1"
#define PROGRAM_WEBSITE @"https://sveinbjorn.org/sloth"
#define PROGRAM_GITHUB_WEBSITE @"https://github.com/sveinbjornt/Sloth"
#define PROGRAM_DONATIONS @"https://sveinbjorn.org/donations"
Expand Down
3 changes: 3 additions & 0 deletions source/ProcessUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ + (NSRunningApplication *)appForPID:(pid_t)pid {
}

+ (BOOL)isAppProcess:(NSString *)bundlePath {
if (!bundlePath) {
return NO;
}
NSString *fileType = [[NSWorkspace sharedWorkspace] typeOfFile:bundlePath error:nil];
return ([[NSWorkspace sharedWorkspace] type:fileType conformsToType:@"com.apple.application"]);
}
Expand Down
5 changes: 4 additions & 1 deletion source/SlothController.m
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,10 @@ - (void)updateProcessInfo:(NSMutableDictionary *)p {

if (app) {
p[@"bundle"] = @YES;
p[@"path"] = [[app bundleURL] path];
NSString *bundlePath = [[app bundleURL] path];
if (bundlePath) {
p[@"path"] = bundlePath;
}
p[@"image"] = [WORKSPACE iconForFile:p[@"path"]];
p[@"app"] = @([ProcessUtils isAppProcess:p[@"path"]]);
} else {
Expand Down
6 changes: 3 additions & 3 deletions sparkle/SlothAppcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<language>en</language>

<item>
<title>Version 2.8</title>
<pubDate>Wednesday, 27 Mar 2019 22:01:00 +0000</pubDate>
<enclosure url="https://sveinbjorn.org/files/software/sloth/sloth-2.8.zip" sparkle:version="210" sparkle:shortVersionString="2.8" length="671365" type="application/octet-stream" sparkle:dsaSignature="MEQCIBLoXfexLCemtjvCZQ35mNjCmQ9ddElBCFOEoBxeaYKyAiBqj1kYWlK5GSY5oPOLm06vfhzT2mX0wvKnC3MWxN0Y5w=="/>
<title>Version 2.8.1</title>
<pubDate>Saturday, 30 Mar 2019 13:06:00 +0000</pubDate>
<enclosure url="https://sveinbjorn.org/files/software/sloth/sloth-2.8.1.zip" sparkle:version="211" sparkle:shortVersionString="2.8.1" length="675202" type="application/octet-stream" sparkle:dsaSignature="MEUCIQCD6Cq468sFxT7D53P90uRw8Bnt53luTq9/Pz+Fbveo+wIgUVncQ1q+Wan3izkY9xuW7xQoqbFEUIwe1xxqCl9kmgE="/>
<sparkle:minimumSystemVersion>10.8.0</sparkle:minimumSystemVersion>
<description><![CDATA[
<h2>New in Sloth 2.8</h2>
Expand Down

0 comments on commit a8f05ed

Please sign in to comment.