mirror of
https://github.com/X1a0He/Adobe-Downloader.git
synced 2025-11-25 03:14:57 +08:00
Fix: Fixed the issue that when launching the program for the first time, the default directory is Downloads, which causes a download error message.
This commit is contained in:
@@ -286,7 +286,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = "Adobe Downloader/Adobe Downloader.entitlements";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 101;
|
||||
CURRENT_PROJECT_VERSION = 102;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Adobe Downloader/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
@@ -300,7 +300,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.0.1;
|
||||
MARKETING_VERSION = 1.0.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.x1a0he.macOS.Adobe-Downloader";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@@ -318,7 +318,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 101;
|
||||
CURRENT_PROJECT_VERSION = 102;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Adobe Downloader/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
@@ -332,7 +332,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.0.1;
|
||||
MARKETING_VERSION = 1.0.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.x1a0he.macOS.Adobe-Downloader";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
||||
@@ -14,7 +14,7 @@ struct Adobe_DownloaderApp: App {
|
||||
@AppStorage("downloadAppleSilicon") private var downloadAppleSilicon: Bool = true
|
||||
@AppStorage("confirmRedownload") private var confirmRedownload: Bool = true
|
||||
@AppStorage("useDefaultDirectory") private var useDefaultDirectory: Bool = true
|
||||
@AppStorage("defaultDirectory") private var defaultDirectory: String = "Downloads"
|
||||
@AppStorage("defaultDirectory") private var defaultDirectory: String = ""
|
||||
private let updaterController: SPUStandardUpdaterController
|
||||
|
||||
init() {
|
||||
@@ -40,8 +40,12 @@ struct Adobe_DownloaderApp: App {
|
||||
}
|
||||
|
||||
if UserDefaults.standard.object(forKey: "useDefaultDirectory") == nil {
|
||||
UserDefaults.standard.set(true, forKey: "useDefaultDirectory")
|
||||
UserDefaults.standard.set("Downloads", forKey: "defaultDirectory")
|
||||
if let downloadsURL = FileManager.default.urls(for: .downloadsDirectory, in: .userDomainMask).first {
|
||||
print(downloadsURL.path)
|
||||
defaultDirectory = downloadsURL.path
|
||||
UserDefaults.standard.set(true, forKey: "useDefaultDirectory")
|
||||
UserDefaults.standard.set(downloadsURL.path, forKey: "defaultDirectory")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user