Skip to content

Commit

Permalink
properly handle spaces in the location --autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Keller committed Mar 8, 2017
1 parent 7ad1cce commit 7548361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/main.swift
Expand Up @@ -214,8 +214,8 @@ func main() throws {
rawLocation = try loadFile ("location.txt")
let components = rawLocation.components(separatedBy: CharacterSet.whitespaces)

user = components [0]
device = components [1]
user = components.first ?? ""
device = components.dropFirst().joined(separator: " ")

location = "\(user)/\(device)"

Expand Down

0 comments on commit 7548361

Please sign in to comment.