File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
ZipBuilder/Sources/ZipBuilder Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,18 @@ extension FileManager {
101101 }
102102 }
103103
104- // Enable a single unique temporary workspace per execution.
105- static let unique : String = UUID ( ) . uuidString
104+ /// Enable a single unique temporary workspace per execution.
105+ private static func timeStamp( ) -> String {
106+ if #available( OSX 10 . 12 , * ) {
107+ let formatter = ISO8601DateFormatter ( )
108+ formatter. formatOptions. insert ( . withInternetDateTime)
109+ return formatter. string ( from: Date ( ) )
110+ } else {
111+ return UUID ( ) . uuidString
112+ }
113+ }
114+
115+ static let unique : String = timeStamp ( )
106116
107117 /// Returns a deterministic path of a temporary directory for the given name. Note: This does
108118 /// *not* create the directory if it doesn't exist, merely generates the name for creation.
You can’t perform that action at this time.
0 commit comments