Closed
Bug 30945
Opened 25 years ago
Closed 25 years ago
File.exists & File.isFile don't work with file in nested dir.
Categories
(Core Graveyard :: Installer: XPInstall Engine, defect, P3)
Core Graveyard
Installer: XPInstall Engine
Tracking
(Not tracked)
VERIFIED
FIXED
M16
People
(Reporter: depman1, Assigned: dbragg)
References
Details
builds 2000-03-07. all platforms.
1. Go to http://jimbob/trigger2.html
2. Select a_fileop_fileexists from the menu (installs file to "Components").
OR enter a_fileop_fileisfile3.xpi (installs file to "Cool").
3. Trigger.
4. Check HD and logfile.
Result: file installed in nested folder, but:
* return value for routine returns 0 (false).
* pathway to file is wrong: C:/Program/componentsfileexists.txt (no "/")
Expected:
* return value for routine returns 1 (true).
* pathway to file is correct: C:/Program/components/fileexists.txt (w/ "/")
note: these scripts don't use a slash between the return getFolder() object (f)
and the appended jarSource file:
fTemp = f + jarSrc;
fileSource = getFolder("file:///", fTemp);
... File.exists(fileSource);
If we use a "/" between them, this works on NT and Linux, but not Mac. (try
a_fileop_fileexists2.xpi to see this)
If we use "Program" instead of a nested folder in getFolder() to get the return
object (f), this works on NT, but not Linux or Mac (try a_fileop_fileexists3.xpi
or a_fileop_fileisfile.xpi). I'll write a separate bug for this.
Here are the NT logfiles:
(look at "fileexists for file ..." and "fileisfile for file" lines):
-------------------------------------------------------------------------------
http://jimbob/jars/a_fileop_fileexists.xpi -- 03/07/2000 15:29:21
-------------------------------------------------------------------------------
Acceptance: a_fileop_fileexists
-------------------------------
[1/1] Replacing: C:\Program Files\Netscape\Netscape
6\components\fileexists.txt
Install completed successfully
The fileexists part
-------------------
** Path to fileexists.txt = C:\Program Files\Netscape\Netscape
6\componentsfileexists.txt
** fileExists for file should return 1 (true) = 0
** Directory returned = C:\Program Files\Netscape\Netscape 6\
** fileExists for directory should return 0 (false) = 1
Install completed successfully
Finished Installation 03/07/2000 15:29:21
-------------------------------------------------------------------------------
file:///C|/FileOps/a_fileop_fileisfile/a_fileop_fileisfile3.xpi -- 03/07/2000
17:54:14
-------------------------------------------------------------------------------
Acceptance: a_fileop_fileisfile
-------------------------------
[1/1] Installing: C:\Program Files\Netscape\Netscape
6\Cool\fileisfile.txt
Install completed successfully
The fileIsFile part
-------------------
** Path to file = C:\Program Files\Netscape\Netscape 6\Coolfileisfile.txt
** fileIsFile should return 1 (true) = false
** Path to file = C:\TEMP\
** fileIsFile should return 0 (false) = false
Install completed successfully
Finished Installation 03/07/2000 17:54:16
Comment 3•25 years ago
|
||
-------------------------------------------------------------------------------
http://jimbob/jars/a_fileop_fileisfile.xpi -- 04/23/2000 21:36:05
-------------------------------------------------------------------------------
Acceptance: a_fileop_fileisfile
-------------------------------
[1/1] Replacing: /builds/dougt/mozilla/dist/bin/fileisfile.txt
Install completed successfully, restart required
The fileIsFile part
-------------------
** Path to file = /builds/dougt/mozilla/dist/bin/fileisfile.txt
** fileIsFile should return 1 (true) = true
** Path to file = /tmp//
** fileIsFile should return 0 (false) = false
Finished Installation 04/23/2000 21:36:06
But notice that g = getFolder("Temporary"); returns an extra slash. Opening a
new bug on that (36915). Marking this paticular bug as fixed.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This bug depends on Bug 23289 to properly verify. Changing QA Contact to David.
Depends on: 23289
QA Contact: jimmylee → depstein
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
•