Closed
Bug 6711
Opened 26 years ago
Closed 26 years ago
GetFolder: object does not appear to get created correctly when passing InstallFolder object
Categories
(Core Graveyard :: Installer: XPInstall Engine, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M9
People
(Reporter: jimmykenlee, Assigned: dveditz)
Details
Build: 5/17/99 SeaMonkey build
1. Use jar at http://jimbob/jars/a_getfolder_2_installfolder.jar
2. Using the form,
f = Install.GetFolder("Temporary");
f2 = Install.GetFolder(f, "getfolder_2_installfolder");
3. Trigger jar
RESULT:
Nothing appears to happen. According to the Install.log, the installscript
aborts:
---------------------------------------------------------------------------
Acceptance: a_getfolder_2_installfolder
---------------------------------------------------------------------------
Starting Installation at 05/18/1999 14:48:39
Aborted Installation at 05/18/1999 14:48:40
Finished Installation 05/18/1999 14:48:40
EXPECTED RESULT:
The component, "smrtupdt.txt", is added to "temp\getfolder_2_installfolder".
The Install.log indicates that the component was added successfully.
set target milestone to M9
workaround for now: use 2-parameter form at the very fist time you call.
Jimmy, please also verify if this is still a valid bug
Comment 3•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 6/16/99 Windows
This now works for me. I cannot reproduce the problem.
Status: ASSIGNED → 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
•