fix cleaning up if errors occur
This commit is contained in:
1 parent
b26b9f3ac7
commit
89704a4238
2 files changed
+5
-3
No files matched your search
@@ -261,7 +261,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 2;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 2P4CP47H76;
|
DEVELOPMENT_TEAM = 2P4CP47H76;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -293,7 +293,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 2;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 2P4CP47H76;
|
DEVELOPMENT_TEAM = 2P4CP47H76;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
|
|||||||
@@ -119,6 +119,9 @@ class PosterBoardManager {
|
|||||||
|
|
||||||
static func applyTendies(_ urls: [URL], appHash: String) throws {
|
static func applyTendies(_ urls: [URL], appHash: String) throws {
|
||||||
let _ = try SymHandler.createDescriptorsSymlink(appHash: appHash)
|
let _ = try SymHandler.createDescriptorsSymlink(appHash: appHash)
|
||||||
|
defer {
|
||||||
|
SymHandler.cleanup()
|
||||||
|
}
|
||||||
for url in urls {
|
for url in urls {
|
||||||
// scope the resource
|
// scope the resource
|
||||||
let accessing = url.startAccessingSecurityScopedResource()
|
let accessing = url.startAccessingSecurityScopedResource()
|
||||||
@@ -146,6 +149,5 @@ class PosterBoardManager {
|
|||||||
|
|
||||||
try? FileManager.default.removeItem(at: descriptors)
|
try? FileManager.default.removeItem(at: descriptors)
|
||||||
}
|
}
|
||||||
SymHandler.cleanup()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user