From 94a652a4bd216e163bc8270dde78b537056fdee5 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Mon, 24 Apr 2000 05:28:49 +0000 Subject: [PATCH] fix for #14313, don't migrate on top of an existing directory. --- profile/src/nsProfile.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/profile/src/nsProfile.cpp b/profile/src/nsProfile.cpp index a21b2ef3e405..7f5a51f468a9 100644 --- a/profile/src/nsProfile.cpp +++ b/profile/src/nsProfile.cpp @@ -1266,7 +1266,13 @@ nsProfile::MigrateProfile(const PRUnichar* profileName, PRBool showProgressAsMod newSpec->GetFileSpec(&newProfDir); newProfDir += profileName; - + newProfDir.MakeUnique(); + if (newProfDir.Exists()) { +#ifdef DEBUG_profile + printf("directory already exists\n"); +#endif + return NS_ERROR_FAILURE; + } // Call migration service to do the work. nsCOMPtr pPrefMigrator;