57 Commits

Author SHA1 Message Date
gerv%gerv.net
13afb6d0f9 Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089.
git-svn-id: svn://10.0.0.236/trunk@104119 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 20:14:13 +00:00
syd%netscape.com
d0df16da36 Set sane directory permissions on creation. Partial fix for 43091. r=dougt
git-svn-id: svn://10.0.0.236/trunk@75608 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 22:13:10 +00:00
dougt%netscape.com
bf7163c089 checked in warren's patch to remove circular memory leak in directory service
removed strcmp'er in favor of atom compares.
added comments to nsFileSpec indicating that it is no longer supported.


git-svn-id: svn://10.0.0.236/trunk@67030 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-25 01:48:02 +00:00
ftang%netscape.com
d578dffe20 fix 22116. Check in patch from m_kato@ga2.so-net.ne.jp
Perform IsDBCSLeadByte before 0x5c escaping


git-svn-id: svn://10.0.0.236/trunk@66524 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-20 05:08:02 +00:00
andreas.otte%primus-online.de
261e05249b fix bug 20891 [Assertion when displaying message], don't try to find a drive in an empty path, r=putterman@netscape.com
git-svn-id: svn://10.0.0.236/trunk@66126 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-16 07:33:25 +00:00
dougt%netscape.com
abce61c08d Optimization for shortcut resolution. r=dveditz.
git-svn-id: svn://10.0.0.236/trunk@60924 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-15 21:28:13 +00:00
dveditz%netscape.com
68359dd41b added quoting so we can execute windows files with spaces in their names -- such as anything in a subdir of 'Program Files'
git-svn-id: svn://10.0.0.236/trunk@59938 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-06 10:09:16 +00:00
pollmann%netscape.com
2af954496b Fix VC 5.0 build bustage r=dougt, harishd
git-svn-id: svn://10.0.0.236/trunk@58972 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-28 00:41:06 +00:00
dougt%netscape.com
9f7467a8a7 xpcom/io changes,
Fixes bug 25028.
Added new dirty flag so that resolutions can be purged.
checked in VC5 fix from pollmann and jband
checked in fix from colin@theblakes.com for VMS.

r= valeski, pollmann, colin@theblakes


git-svn-id: svn://10.0.0.236/trunk@58810 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-26 21:55:13 +00:00
bienvenu%netscape.com
0f7df50fc0 fix crash on win98 with funny file names, r=dougt 23578
git-svn-id: svn://10.0.0.236/trunk@58234 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-19 07:29:33 +00:00
waterson%netscape.com
6e7877c837 Make ResolveSymLink() fail silently if target was not a shortcut. r=lumpy
git-svn-id: svn://10.0.0.236/trunk@58181 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-19 00:35:01 +00:00
bienvenu%netscape.com
a6d5ab0a18 fix file truncation on windows, was breaking pop filters, r=dougt, a=chofmann 20634
git-svn-id: svn://10.0.0.236/trunk@55871 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-10 23:33:30 +00:00
norris%netscape.com
d630910cd9 I ran Purify and found this:
>
> [E] ABR: Array bounds read in
> nsFileSpecHelpers::UnixToNative(nsSimpleCharString&) {48 occurrences}
>     Reading 1 byte from 0x03f00b2c (1 byte at 0x03f00b2c illegal)
>     Address 0x03f00b2c is 1 byte past the end of a 268 byte block at
> 0x03f00a20
>     Address 0x03f00b2c points to a malloc'd block in heap 0x03c30000
>     Thread ID: 0x9c
>     Error location
>         nsFileSpecHelpers::UnixToNative(nsSimpleCharString&)
> [nsFileSpecWin.cpp:111]
>                     src = (char*)ioPath;
>
>                     // Convert '/' to '\'.
>              =>     while (*++src)
>                     {
>                         if (*src == '/')
>                             *src = '\\';
>         nsFileSpec::+=(char const*) [nsFileSpecWin.cpp:394]
>         nsChromeRegistry::CheckForProfileFile(nsCAutoString
> const&,nsCAutoString&) [nsChromeRegistry.cpp:1278]
>         nsChromeRegistry::LoadDataSource(nsCAutoString const&,nsIRDFDataSource
> * *,int) [nsChromeRegistry.cpp:713]
>
> nsChromeRegistry::InitializeDataSource(nsString&,nsString&,nsIRDFDataSource *
> *,int) [nsChromeRegistry.cpp:784]
>         nsChromeRegistry::ConvertChromeURL(nsIURI *)
> [nsChromeRegistry.cpp:527]
>         nsChromeProtocolHandler::NewChannel(char const*,nsIURI *,nsILoadGroup
> *,nsIInterfaceRequestor *,UINT,nsIURI *,UINT,UINT,nsIChannel * *)
> [nsChromeProtocolHandler.cpp:371]
>         nsIOService::NewChannelFromURI(char const*,nsIURI *,nsILoadGroup
> *,nsIInterfaceRequestor *,UINT,nsIURI *,UINT,UINT,nsIChannel * *)
> [nsIOService.cpp:250]
>         nsDocumentOpenInfo::Open(nsIURI *,int,char const*,nsISupports *,nsIURI
> *,nsIInputStream *,nsISupports *,nsISupports * *) [nsURILoader.cpp:168]
>         nsURILoader::OpenURIWithPostDataVia(nsIURI *,int,char
> const*,nsISupports *,nsIURI *,nsIInputStream *,nsISupports *,nsISupports *
> *,UINT) [nsURILoader.cpp:418]
>     Allocation location
>         malloc         [dbgheap.c:129]
>         PR_Malloc      [prmem.c:38]
>         nsSimpleCharString::ReallocData(UINT) [nsFileSpec.cpp:248]
>         nsSimpleCharString::CopyFrom(char const*,UINT) [nsFileSpec.cpp:167]
>         nsSimpleCharString::nsSimpleCharString(char const*)
> [nsFileSpec.cpp:60]
>         nsFileSpecHelpers::UnixToNative(nsSimpleCharString&)
> [nsFileSpecWin.cpp:104]
>         nsFileSpec::+=(char const*) [nsFileSpecWin.cpp:394]
>         nsChromeRegistry::CheckForProfileFile(nsCAutoString
> const&,nsCAutoString&) [nsChromeRegistry.cpp:1278]
>         nsChromeRegistry::LoadDataSource(nsCAutoString const&,nsIRDFDataSource
> * *,int) [nsChromeRegistry.cpp:713]
>
> nsChromeRegistry::InitializeDataSource(nsString&,nsString&,nsIRDFDataSource *
> *,int) [nsChromeRegistry.cpp:784]
>
> which is fixed by this patch.


git-svn-id: svn://10.0.0.236/trunk@55693 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-08 02:53:37 +00:00
fur%netscape.com
92928f5ea4 Fix build bustage, maybe. Get rid of unnecessary const
git-svn-id: svn://10.0.0.236/trunk@53954 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-19 02:35:02 +00:00
fur%netscape.com
e3d83679ec In support of #8305 (implement cache).
Add Truncate() method to nsIFileSpec and implement in nsFileSpecImpl

[Mac Implementation: sdagley, r: sfraser]
[Win implementation: fur, r:rogerl]
[Unix implementation: yixiong.zue@intel.com, r: fur]


git-svn-id: svn://10.0.0.236/trunk@53948 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-19 01:42:46 +00:00
dmose%mozilla.org
0efb7c174c updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52910 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 03:43:54 +00:00
dveditz%netscape.com
6b0912645b Changing nsFileSpec Copy and Move function names to match their
functionality, and also to free up the namespace for a *real* Copy
and Move that allow renaming the leaf name rather than just copying
into different directories (i.e. to make backup files). r=ssu


git-svn-id: svn://10.0.0.236/trunk@51333 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:40:39 +00:00
sfraser%netscape.com
8023b08ebc Fix for bugs 15795 and 16090 -- fix startup crash which was due to an uninitialized nsFileSpec trashing the stack. Also no longer set mError on CreateDirectory if the dir already exists, prevent += "foo" when mError is set, and add assertions XP to catch calls with NULL strings.
reviewed by dougt and (in part) sspitzer. a=leaf.


git-svn-id: svn://10.0.0.236/trunk@50360 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-11 21:19:06 +00:00
dveditz%netscape.com
f8e3f2c05b hoping this fixes dougt's bustage
git-svn-id: svn://10.0.0.236/trunk@46843 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-10 20:58:46 +00:00
dougt%netscape.com
4b0f769454 changing GetDiskSpaceAvailable to return a signed 64 bit value
git-svn-id: svn://10.0.0.236/trunk@46835 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-10 20:03:56 +00:00
dougt%netscape.com
66f1984420 nsFileSpec::GetDiskSpace now returns a PRUint64. (12479)
thanks to Chet Murphy <cmurphy@modelworks.com> for the windows code!


git-svn-id: svn://10.0.0.236/trunk@46590 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-09 19:20:35 +00:00
dougt%netscape.com
24830fc232 This fixes a nsDirectoryIterator bug that bliz, seth and I were working on last night.
Approved by cyeh.


git-svn-id: svn://10.0.0.236/trunk@41552 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-29 14:24:47 +00:00
dveditz%netscape.com
23d69cafba fixes VC5 link bustage, but I feel dirty
git-svn-id: svn://10.0.0.236/trunk@41189 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-27 00:57:50 +00:00
dougt%netscape.com
d219f1385e Fix for bug 10177 and 10041.
git-svn-id: svn://10.0.0.236/trunk@41167 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-26 22:09:42 +00:00
dougt%netscape.com
0e3652a9a5 fix for bug: 10260
removed warning in nsIFileStream.cpp


git-svn-id: svn://10.0.0.236/trunk@40445 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-21 17:56:01 +00:00
racham%netscape.com
f8eb4fa44c Adding RecursiveCopy interface
git-svn-id: svn://10.0.0.236/trunk@38347 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-05 01:39:42 +00:00
dougt%netscape.com
f74fc1db68 removing an evil and unneeded delete [].
git-svn-id: svn://10.0.0.236/trunk@33002 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-27 22:02:17 +00:00
mcmullen%netscape.com
1e28667a7e Assert when nsFileSpec gets a unix path
git-svn-id: svn://10.0.0.236/trunk@31187 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-12 00:17:53 +00:00
mcmullen%netscape.com
3ac0828129 Fix nsFileSpec to take native paths in constructors and assignment operators. Fix += to work with relative paths on Macintosh. Remove dependency of nsFileSpec on streams (so that dp can move nsFileSpec).
git-svn-id: svn://10.0.0.236/trunk@30800 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-08 01:18:23 +00:00
mcmullen%netscape.com
41ee8ce9bd Check for a null path before calling stat() and friends (bug #5576). a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@29975 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-03 20:29:01 +00:00
mcmullen%netscape.com
9cbd94005d Patch from Michael Lowe (part of #5473) replace true by PR_TRUE
git-svn-id: svn://10.0.0.236/trunk@29216 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-26 19:34:39 +00:00
mcmullen%netscape.com
7466c2717c Leakage and mismatch of allocate/free methods (patches submitted by Bruce Mitchener). Bug #5140.
git-svn-id: svn://10.0.0.236/trunk@29215 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-26 19:05:00 +00:00
mcmullen%netscape.com
c0a796a5c4 Oops.
git-svn-id: svn://10.0.0.236/trunk@28290 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 19:31:11 +00:00
mcmullen%netscape.com
7a5c8880e7 Correct a problem my last change to GetParent() introduced.
git-svn-id: svn://10.0.0.236/trunk@28281 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 19:09:22 +00:00
mcmullen%netscape.com
0a56e0d57d Fixed GetParent() on windows and unix (was incorrect for directories whose paths end in a separator).
git-svn-id: svn://10.0.0.236/trunk@28107 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-19 22:07:42 +00:00
dougt%netscape.com
4ed02c79b9 Make the windows specific code use nsprPath.
git-svn-id: svn://10.0.0.236/trunk@26905 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-10 00:30:23 +00:00
dougt%netscape.com
61ba04689f Now adjusting the nsFileSpec after a Move().
Also fixing a bug with Rename().  Now it should successfully take
partial pathnames on Unix and Windows.


git-svn-id: svn://10.0.0.236/trunk@24612 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-21 06:22:45 +00:00
mcmullen%netscape.com
a2a3982ee7 Bugs #3997, 3934
git-svn-id: svn://10.0.0.236/trunk@24495 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-19 23:09:39 +00:00
mcmullen%netscape.com
3b2fd6b905 Fix a parameter type.
git-svn-id: svn://10.0.0.236/trunk@24060 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 07:07:33 +00:00
mcmullen%netscape.com
de8fc99c4f Upgrades, bugfixes (including nsFilePath no longer hex escaped). Features (including DiskSpaceAvailable)
git-svn-id: svn://10.0.0.236/trunk@24058 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 06:38:57 +00:00
mcmullen%netscape.com
bdbf667fac Added GetModDate and GetFileSize. Fixed a crash with a strcmp of null.
git-svn-id: svn://10.0.0.236/trunk@23564 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:02:58 +00:00
dougt%netscape.com
d643c0b6d4 No longer shifting windows nsFileSpec's mPath to uppercase.
Now comparing without regard to case instead on windows.
Windows nsSpecialSystemDirectory will have all uppercase mPaths.


git-svn-id: svn://10.0.0.236/trunk@23552 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:07:10 +00:00
mcmullen%netscape.com
2b21b06cb7 Turning on dougt's special system directory stuff, and adding it to the Macintosh build. Fixed spurious leading slash on getting leaf name (win and unix). Adding dougt's equality test operator, too. Adding dougt's test code for all the above.
git-svn-id: svn://10.0.0.236/trunk@23385 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:33:36 +00:00
mcmullen%netscape.com
9e4dad31a3 Fix seek again so it resets eof. Allow ns*FileStream stack-based classes to be closed explicitly. Fix refcounting. Remove "close on destroy" kludge.
git-svn-id: svn://10.0.0.236/trunk@22383 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-28 01:36:48 +00:00
dougt%netscape.com
451b4db4af Merging branch BASE_19_FEB_99 to tip. These are extensive changes
to nsFileSpec and and nsFileStream.  See dougt@netscape.com or
John McMullen for futher information.


git-svn-id: svn://10.0.0.236/trunk@21977 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 20:49:47 +00:00
waterson%netscape.com
c3e5920240 Got Win32-specific stuff up and running. This caused a bit of code-juggling in the Unix and Mac implementations. a=mcmullen.
git-svn-id: svn://10.0.0.236/trunk@18654 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-26 23:49:33 +00:00
mcmullen%netscape.com
4272dc5b57 Fix unused parameter warning.
git-svn-id: svn://10.0.0.236/trunk@17290 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 02:11:24 +00:00
kipp%netscape.com
3457e843ef Make it compile on windows
git-svn-id: svn://10.0.0.236/trunk@17288 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-07 01:46:22 +00:00
mcmullen%netscape.com
67a2f24b86 Added a directory iterator class. Added canonification and recursive directory creation, and some other handy methods. Eventual goal: replace xp_file.h entirely.
git-svn-id: svn://10.0.0.236/trunk@17274 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-06 23:38:21 +00:00
law%netscape.com
54ddc73d23 Minor fix in operator=
git-svn-id: svn://10.0.0.236/trunk@16289 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-12 01:28:28 +00:00