Closed
Bug 7906
Opened 26 years ago
Closed 26 years ago
GetFolder: Adding component fails with "Components" as target folder with subdirectory
Categories
(Core Graveyard :: Installer: XPInstall Engine, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M10
People
(Reporter: jimmykenlee, Assigned: cathleennscp)
Details
Build: 6/9/99 SeaMonkey build
1. Trigger http://jimbob/jars/a_getfolder_2_components.jar
2. Using the form:
f = Install.GetFolder("Components", "getfolder_components");
RESULT:
From the applications directory, "Componentsgetfolder_components" is created as
a subdirectory. The component, "smrtupdt.txt", is not installed.
The Install.log shows:
---------------------------------------------------------------------------
Acceptance: a_getfolder_2_components
---------------------------------------------------------------------------
Starting Installation at 06/10/1999 10:35:56
Item [1/1] Installing:
C:\Program Files\moz69\x86rel\Componentsgetfolder_components\smrtupdt.txt
Finished Installation 06/10/1999 10:35:57
EXPECTED RESULT:
"getfolder_components" is a subdirectory of "components" which is a subdirectory
of the application directory. "smrtupdt.txt" is installed in
"getfolder_components". The Install.log reflects the proper directory where the
component is installed.
***Correction: The component, "smrtupdt.txt", is installed.
Behavior is fine if no subdirectory is passed from GetFolder
(f = Install.GetFolder("Components");)
http://jimbob/jars/a_getfolder_2_components_nosubdir.jar
Comment 4•26 years ago
|
||
Here is the diff that needs to be applied to fix these bugs (6711, 7905, 7906).
Since I doubt the tree will be open anytime soon and I leave on vaction in three
days, dveditz will check these fixes in.
Index: nsInstallFolder.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpinstall/src/nsInstallFolder.cpp,v
retrieving revision 1.9
diff -c -4 -r1.9 nsInstallFolder.cpp
*** nsInstallFolder.cpp 1999/05/27 21:02:50 1.9
--- nsInstallFolder.cpp 1999/06/16 15:17:16
***************
*** 97,117 ****
it can be a Directory. If it is the later, it must already exist and
of course be a directory
not a file.
*/
! nsFileSpec dirCheck(aFolderID);
! if ( (dirCheck.Error() == NS_OK) && (dirCheck.IsDirectory()) &&
(dirCheck.Exists()))
{
- nsString tempString = aFolderID;
- tempString += aRelativePath;
- mFileSpec = new nsFileSpec(tempString);
! // make sure that the directory is created.
! nsFileSpec(mFileSpec->GetCString(), PR_TRUE);
! }
! else
! {
! SetDirectoryPath( aFolderID, aRelativePath);
}
}
--- 97,127 ----
it can be a Directory. If it is the later, it must already exist and
of course be a directory
not a file.
*/
! SetDirectoryPath( aFolderID, aRelativePath);
!
! if (mFileSpec == nsnull)
{
! nsFileSpec dirCheck(aFolderID);
! if ( (dirCheck.Error() == NS_OK) && (dirCheck.IsDirectory()) &&
(dirCheck.Exists()))
! {
! mFileSpec = new nsFileSpec(dirCheck);
!
! if (aRelativePath.Length() > 0)
! {
! nsString tempPath(aRelativePath);
!
! if (aRelativePath.Last() != '/' || aRelativePath.Last() !=
'\\')
! tempPath += '/';
!
! *mFileSpec += tempPath;
! }
!
! // make sure that the directory is created.
! nsFileSpec(mFileSpec->GetCString(), PR_TRUE);
! }
}
}
***************
*** 271,279 ****
default:
mFileSpec = nsnull;
return;
}
! #ifndef XP_MAC
if (aRelativePath.Length() > 0)
{
nsString tempPath(aRelativePath);
--- 281,289 ----
default:
mFileSpec = nsnull;
return;
}
!
if (aRelativePath.Length() > 0)
{
nsString tempPath(aRelativePath);
***************
*** 281,289 ****
tempPath += '/';
*mFileSpec += tempPath;
}
- #endif
// make sure that the directory is created.
nsFileSpec(mFileSpec->GetCString(), PR_TRUE);
}
}
--- 291,298 ----
Build 7/27/99
No longer seeing this problem. Behaves as expected from WinNT, Win98, Linux,
and Macintosh.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Bulk move of XPInstall (component to be deleted) bugs to Installer: XPInstall
Engine
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•