Commit Graph

170 Commits

Author SHA1 Message Date
roc+%cs.cmu.edu
0e3ff503fb Bug 226439. Convert Seamonkey to EqualsLiteral. rs=darin 2004-05-22 22:15:22 +00:00
bzbarsky%mit.edu
62a5127738 Relanding, since backing out did not fix orange. Bug 232691. 2004-05-22 20:02:43 +00:00
bzbarsky%mit.edu
7f1e54b18d Backing out to attempt to fix Mac orange. Bug 232691 2004-05-22 19:26:52 +00:00
bzbarsky%mit.edu
abcad1dc39 Convert users of nsC?String(), nsC?AutoString(), and NS_LITERAL_C?STRING("") to
using EmptyC?String instead.  Bug 232691, patch by Charles Fenwick
<clf03f@garnet.acns.fsu.edu>, r+sr=bzbarsky
2004-05-22 17:04:53 +00:00
gerv%gerv.net
31625ba2b1 Bug 236613: change to MPL/LGPL/GPL tri-license. 2004-04-18 14:21:17 +00:00
cbiesinger%web.de
0b005761a9 backing out 240192 patch 2004-04-16 20:10:47 +00:00
cbiesinger%web.de
03c30951ad bug 240192, nsLocalFileUnix doesn't work with files larger than 2 GB
r+sr=darin
2004-04-16 19:01:58 +00:00
bryner%brianryner.com
3e2d90ecb7 fixing hpux bustage, bug 239465, r=dbaron 2004-04-02 23:48:18 +00:00
bryner%brianryner.com
bd24b78f8d Fixing hpux bustage. r=dbaron. 2004-04-01 23:13:25 +00:00
darin%meer.net
c380c59f65 landing dbaron's patch for bug 235735 "fix callers that cast away const on result of ns[C]String::get" r+sr=darin 2004-02-28 22:34:07 +00:00
bryner%brianryner.com
0c7c3a2ff3 Bug 229875 - eliminate unnecssary public/virtual destructors. This patch changes all refcounted classes under xpcom/, which aren't inherited from or used on the stack, to have private, nonvirtual destructors. r=dougt, sr=dbaron. 2004-01-15 06:14:18 +00:00
cbiesinger%web.de
f1d3381adb Bug 183871
Crash on "Show hidden files and directories" [@ nsFileView::SetDirectory(nsIFile*) ]
fix: don't let files be initialized with relative paths.
also fix the directory service to not do that.

r=dougt sr=bzbarsky
2003-12-25 22:05:01 +00:00
dwitte%stanford.edu
9ae54e162c Bug 122892: nsLocalFile::Clone should preserve stat info.
make nsLocalFile* impls use copy constructors for their nsIFile::Clone methods.
This avoids unnecessary |stat| calls inherent in using NS_NewNativeLocalFile.

b=122892, r=dougt, sr=darin, with many thanks to biesi & mkaply for testing on other
plats.
2003-07-18 22:14:16 +00:00
caillon%returnzero.com
4cc64cee34 Bug 209852. Remove |dont_QueryInterface|.
r=dbaron, sr=jag
2003-06-21 00:15:41 +00:00
timeless%mozdev.org
4942b03239 Bug 187031 [nsLocalFileWin] nsLocalFile::Remove returns os remove values (-1) as nsresults
r=dougt sr=darin
2003-06-18 23:19:11 +00:00
dbaron%dbaron.org
12a781c511 Make implementations consistent across platforms: ensure IsDirectory and IsFile return false even when the file doesn't exist (and they return an nsresult error status). b=187014 r=dougt sr=alecf 2003-01-13 23:17:49 +00:00
dbaron%dbaron.org
b9083989bb Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 23:19:20 +00:00
arougthopher%lizardland.net
b7836f3da0 Bug#169506
IsExecutable() deos not work for BeOS

BeOS now uses stat() instead of access() for:
IsWritable()
IsReadable()
IsExecutable()

sr=scc
r-dougt,arougthopher
2002-10-05 19:06:28 +00:00
dougt%netscape.com
68faeb5241 166917. Clean up xpcom SDK includes. r=rpotts@netscape.com, sr=alecf@netscape.com, a=rjesup@wgate.com 2002-09-07 17:13:19 +00:00
pete%alphanumerica.com
1985d3f734 b=121489, r=dougt, sr=bzbarsky
Simple fix for nsIFile GetParent to return null when already at the top of the volume
Thanks guys for the speedy review.

--pete
2002-09-07 02:00:31 +00:00
dougt%netscape.com
292b06c6ef Fixes 165561. r=me, sr=darin, by=pete collins 2002-08-29 23:11:20 +00:00
shaver%mozilla.org
fb0d67af5b Bug 76968: expand ~/ into NS_OS_HOME_DIR in nsLocalFileUnix. r=bzbarsky,
sr=blizzard.
2002-06-17 21:03:43 +00:00
darin%netscape.com
7420d70bf9 fixes bug 147333 "Cannot load local files whose names contain
Japanese/Chinese characters" r=bstell sr=brendan a=asa
2002-06-10 18:50:11 +00:00
darin%netscape.com
838fb89c78 freezing nsIFile/nsILocalFile API (b=129279)
r=dougt sr=alecf
2002-05-13 22:55:29 +00:00
darin%netscape.com
6fd5862e6e fixes bug 142870 "nsIFile should use UCS-2 instead of UTF-8"
r=dougt sr=alecf
2002-05-07 23:07:19 +00:00
timeless%mac.com
062a95f64d Bug 125489 'Privacy & Security' item has no children + items from tasks menu
patch by Roland.Mainz@informatik.med.uni-giessen.de
r=dougt sr=brendan
2002-05-01 23:04:46 +00:00
brendan%mozilla.org
1bbd2fb18b Avoid opening and trying to reopen in CopyTo, so we work on FAT32 filesystems mounted on Linux (e.g.; 134163, r=dougt, sr=waterson). 2002-04-29 23:35:18 +00:00
darin%netscape.com
e554d83626 fixes bug 129279 "nsIFile unicode/utf8/ascii task"
r=dougt sr=alecf
2002-04-27 05:33:09 +00:00
seawood%netscape.com
e1e0b68be2 Backing out alecf's checkin for bug 124497 to fix comet startup test problem.
Dougt claims that nsLocalFile's copy constructor doesn't work.
r=sleestack
2002-03-20 03:16:09 +00:00
alecf%netscape.com
d4a8db354a fix leak caused by nsLocalFile::Clone() where we were copying the refcnt to the new object - bug 124497
this ends up being more of a performance win than anyting on Unix and OS/2
r=mkaply, dbaron, sr=darin, a=asa
2002-03-20 00:25:21 +00:00
arougthopher%lizardland.net
b4f0190760 Fix for Bug#69707
BeOS implementation of nsLocalFile::Launch and nsLocalFile::Reveal

r=cls (seawood@netscape.com)
a=asa (asa@mozilla.org) on behalf of drivers
2002-02-21 03:33:42 +00:00
bzbarsky%mit.edu
648c636bba Get rid of extra leading slashes appearing in unix paths. Bug 124873,
r=petejc@optonline.net, sr=brendan.
2002-02-12 21:05:56 +00:00
dougt%netscape.com
e27f1817ae backing out. not part of 122523 bug fix 2002-02-06 20:42:02 +00:00
dougt%netscape.com
9659a6ca32 Optimization which gathers stat() info when opening a file. bug 122523, r=dp@netscape.com, sr=dveditz@netscape.com 2002-02-06 20:40:40 +00:00
dougt%netscape.com
48c22e5ce4 backing out my optimization 2002-02-02 03:20:01 +00:00
darin%netscape.com
e744cc20da should fix btek bustage 2002-02-02 02:49:52 +00:00
dougt%netscape.com
97c85e367d fixes 122892. Optimization Clone of nsLocalFile. Instead of reiniting object, we use default c++ copy construction. r=ccarlen@netscape.com, sr=dveditz@netscape.com 2002-02-02 01:25:57 +00:00
seawood%netscape.com
485c70c6c9 S_ISSOCK isn't defined on BeOS. 2002-01-28 07:02:02 +00:00
pete%alphanumerica.com
fcb153605f movind implementation of FilleStatCache into nsLocalFileUnix.cpp
where other calls to lstat work fine

This is an attempt to fix bustage on some linux platfroms

--pete
2002-01-27 18:02:18 +00:00
pete%alphanumerica.com
1b90b08e4d b=107641, r=blizzard, sr=brendan
fix: CopyTo won't copy read-only files or broken symlinks

Thanks to garths@oeone.com for help on this one.

--pete
2002-01-27 14:31:25 +00:00
darin%netscape.com
b7c1f99a52 these files no longer need to include nsEscape.h 2002-01-12 01:21:40 +00:00
alecf%netscape.com
63991ddfde final fix for bug 100212 - removal final dependency on necko from xpcom by removing nsIFile.URL r=dougt, sr=darin Yay! 2002-01-09 20:03:46 +00:00
tingley%sundell.net
a117febf17 bug 100132: clean up over-zealous error masking in
nsRDFXMLDataSource::BlockingParse(), and bring nsLocalFileUnix's
OpenNSPRFileDesc() return values in line with other platforms.
r=waterson, sr=brendan
2001-12-22 19:08:48 +00:00
dougt%netscape.com
7e73e8ffc0 more bustage 2001-12-19 01:03:10 +00:00
dougt%netscape.com
849d297364 nsIComponentManager API Changes (bug 98553)
a) create a new nsIComponentManager with only four functions on it:
CreateInstance CreateInstanceByContractID GetClassInfo GetClassInfoByContractID.

b) rename the old nsIComponentManager to nsIComponentManagerObsolete.

c) fixes callers which use to access the nsIComponentManager for component
registration functionality.  These callers will temporary use the
nsIComponentManagerObsolete interface.

d) Create a new API NS_GetComponentManager() which mirrors the
NS_GetServiceManager()

e) Perserves the old NS_GetGlobalComponentManager().  Note the cast usage.

r/sr = rpotts@netscape.com  alecf@netscape.com  brendan@mozilla.org
2001-12-19 00:12:41 +00:00
dbaron%fas.harvard.edu
b7c07a1976 Fix inefficient Assign pattern to use Append instead. b=113188 r=jag sr=jst 2001-12-08 22:51:15 +00:00
pete%alphanumerica.com
85d0b5722c b=112515, r=douft, sr=jst
remove spawn method from nsIFile.

/**
    Warning nsIFile API change
 */

--pete
2001-12-04 00:27:43 +00:00
pete%alphanumerica.com
28c185b5db b=92569, r=dougt, sr=brendan
nsLocalFileUnix cleanup part two.
nothing but white space and comment cleanup

--pete
2001-11-29 00:07:10 +00:00
pete%alphanumerica.com
a82ecaf0ae b=92569, r=dougt, sr=brendan
nsLocalFileUnix general clean up

--pete
2001-11-28 15:12:14 +00:00
dbaron%fas.harvard.edu
824e7d22ca Make nsSharable[C]String writable by overriding appropriate methods. Ensure that it doesn't store null buffer handle pointer internally, and override get() on nsXPIDL[C]String for backwards-compatibility. Collapse nsSharedBufferHandle and nsFlexBufferHandle into nsSharedBufferHandle which knows its length but can't have a storage start distinct from its data start. Convert string users who were working around broken nsSharableString::Assign back to using it. b=104663, 100751, 74726 r=jag sr=scc 2001-11-28 05:22:57 +00:00
timeless%mac.com
51a4520c4a Bugzilla Bug 107823 change nsIFile
to use 'Modified' instead of 'Modification'
r=akkana sr=brendan
2001-11-26 08:05:05 +00:00
dp%netscape.com
3e3cce3d7c Printing the dll name in the timeline r=sgehani, sr=sfraser 2001-11-17 20:23:48 +00:00
locka%iol.ie
b356d6dbfb Fix for nsILocalFIle::GetURL returning malformed URLs on Unix. b=110299 r=blizzard@mozilla.org sr=waterson@netscape.com 2001-11-16 12:07:38 +00:00
pete%alphanumerica.com
7715f0fe9d b=108925, r=shaver, sr=jst
patch to remove symlinked dirs when recursive flag is set to false

--pete
2001-11-14 03:42:59 +00:00
pete%alphanumerica.com
70156fa98e b=53596, r=dougt, sr=brendan
nsLocalFileUnix fix for ::GetLeafName not working on relative paths

--pete
2001-11-11 00:15:28 +00:00
dbaron%fas.harvard.edu
bfb2f49916 Add assertions that users of nsDependentC?String meet the requirements of nsAFlatC?String. Add nsDependentSingleFragmentC?Substring for users that don't. Additional cleanup after bug 100214. b=104651 r=jag sr=scc 2001-11-07 04:12:20 +00:00
pete%alphanumerica.com
ba3370cffd b=92329, r=ccarlen, sr=brendan
Fix for nsLocalFileUnix ::GetTarget doesn't handle relative symlinks


--pete
2001-11-06 01:42:00 +00:00
pete%alphanumerica.com
b52992027b b=107823, r=ccarlen, sr=brendan
--pete
2001-11-01 00:11:15 +00:00
dougt%netscape.com
80a163df0e ugh. I did not mean to commit these changes. Backing out 2001-10-30 22:19:32 +00:00
dougt%netscape.com
e03c679302 Moving nsISimpleEnumeratory interface into a seperate idl file. bug 99136. r=alecf@netscape.com, sr=rpotts@netscape.com 2001-10-30 22:03:05 +00:00
jaggernaut%netscape.com
f05776cedf Bug 53057: [API] turn off implicit |CharT*| conversion operators for nsCString, rr=dbaron, rs=scc 2001-10-24 09:06:49 +00:00
pete%alphanumerica.com
61a82b2d59 Fix for nsLocalFile::CopyTo not fully implemented on Unix.
r=ccarlen, sr=brendan, b=53474

--pete
2001-08-03 03:42:04 +00:00
pete%alphanumerica.com
299a281e21 Fix for broken AppendRelativePath on unix. r=jag, sr=brendan b=55406.
Note, this method will be going away soon.

--pete
2001-08-03 03:26:26 +00:00
pete%alphanumerica.com
f020dcc1cd Fix for nsIFile delete conflicts with JS reserved name b=37406, r=dougt, sr=jst
Renamed all Delete methods to Remove.

--pete
2001-07-24 18:38:25 +00:00
dbaron%fas.harvard.edu
aa4fec2b67 Header include dependency cleanup. b=64023 r=jag rs=brendan 2001-07-16 02:40:48 +00:00
kandrot%netscape.com
4b1cdae4e6 Adding default string in Normalize to allow Purify to run under Solaris. r=kandrot@netscape.com, sr=scc@mozilla.org 2001-07-09 23:42:00 +00:00
mkaply%us.ibm.com
07ac9d2406 Beos build bustage - 82205 2001-06-30 20:26:40 +00:00
pete%alphanumerica.com
98341fcf19 Fix for nsIFile IsSpecial. r=dougt sr=jst b=82205
Checking this in for tenthumbs.

--pete
2001-06-30 13:30:32 +00:00
pete%alphanumerica.com
45ad96b478 Fix for nsIFile GetTarget method.
r=dougt sr=jst b=88032

--pete
2001-06-29 17:43:59 +00:00
scc%mozilla.org
a5e83cef5a fixing ports bustage 2001-06-29 17:39:25 +00:00
pete%alphanumerica.com
d11372133c Fix for broken nsIFile method IsSymlink
b=81927 r=blizzard sr=jst

--pete
2001-06-28 12:03:47 +00:00
pete%alphanumerica.com
cc3862d93c Fix for mPath string corruption when nsIFile parent is called and the
file is a top level dir such as /tmp

b=84738 r=dougt sr=jst

--pete
2001-06-27 12:29:45 +00:00
dougt%netscape.com
758f79ff72 Landing url parsing branch. 73845. r=alecf@netscape.com, sr=darin@netscape.com, a=blizzard@rednat.com.
This fixes many crashes caused by illegal uses of the nsStdURL.
This also allows a plugable protocol to provide their own url parser.
2001-06-21 22:02:47 +00:00
scc%mozilla.org
a8fb409c6e bug #85271: sr=waterson, r={beard, jag, dbaron}, a=asa. Eliminate features of |nsXPIDLC?String| that keep it out of the string hierarchy (i.e., using assigment to rebind ownership, static |Copy| members, and |getter_Shares|), fixing some leaks in the process. 2001-06-17 05:23:38 +00:00
colin%theblakes.com
5efc62e4d9 Check for ENXIO as well as EXDEV as expected failure from rename.
b=70915 r/sr=brendan
2001-05-21 23:15:33 +00:00
dougt%netscape.com
474638a2eb won't compile without long long type. Using LL_ macros instead. r=thorgal@amiga.com.pl, sr=brendan@mozilla.org, b=75815 2001-04-26 05:28:31 +00:00
dveditz%netscape.com
184c59ebaf bug 71393, miscalculates free space on large drives. Contributed by thorgal@amiga.com.pl and bzbarsky@mit.edu, r=ksosez@softhome.net/dveditz@netscape.com 2001-04-18 04:30:26 +00:00
dveditz%netscape.com
73ea080f9d bug 42704 missing initialization in nsLocalFile::GetFileSize, r=dougt/sr=mscott 2001-02-07 00:14:33 +00:00
mscott%netscape.com
c38767a7e4 Bug #63346 --> add methods for reveal and launch to a local file. Stub implementions for OS/2 and Unix right now.
r=conrad
sr=sspitzer
2001-01-30 05:02:48 +00:00
cls%seawood.org
3ea6bf0f4d Fix the BeOS implementation of Normalize().
Thanks to Hiromasa Kato <hiro@eng.iastate.edu> for the patch.
Bug #53014 r=cls@seawood.org sr=scc@mozilla.org
2000-11-28 01:43:09 +00:00
colin%theblakes.com
880969402b OpenVMS specific fix for defeciency in stat.
b=60199 r=dougt a=waterson
2000-11-27 11:19:41 +00:00
warren%netscape.com
cd56c0575b Bug 47207. Backing out logging/PRINTF changes until we can fix stopwatch.h, introduce double parens, etc. 2000-10-28 22:17:53 +00:00
warren%netscape.com
9a6d92a433 Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson 2000-10-27 22:43:51 +00:00
brendan%mozilla.org
a791fb2253 Fixes to use atomic rename(2) if possible in nsLocalFile::MoveTo (33098, r=?),
plus a bunch of other fixes and cleanups:

- Fix comment misstatements of fact in nsIFile.idl, improve style slightly.
- Fix typo in comment in nsILocalFile.idl.
- Avoid gratuitous nsCString and nsXPIDLCString copy-constructions, which
  entail malloc'ing, in nsLocalFileUnix.cpp's CopyTo and GetParent methods.
  But do use nsXPIDLCString instead of raw nsMemory::Alloc/Free.
- Get rid of unnecessary mLL_II2L and mLL_L2II macros, use "prlong.h" API only.
  Also use the LL_* macros consistently in case a Unix lacking long long type
  support wants to use this code.
* BTW, the "Date" methods should be renamed to use "Time" instead -- after all
  PRTime is the type, and traditionally "time" refers to the time-number, a
  scalar independent of one's position on the surface of the earth, while
  "date" refers to a struct full of locale-specific information derived from
  time and some "environment" variables such as DST.  Can we rename these
  nsIFile methods before Mozilla 0.9 / Netscape 6?
- Use CHECK_mPath consistently and first, before any assertions relating to
  arguments (which logically come after the 'this' parameter CHECK_mPath is
  making assertions about).
- Use nsCOMPtr for singly-inheriting implementations of XPCOM interfaces, to
  avoid scary-when-scaled 0-refcnt instances from being handled (these all
  got a ref via QI or equivalent soon enough, but you never know).  This also
  removed some naked deletes.
- Canonize all paths copied into mPath to lack trailing slashes, so we don't
  need to strip trailing slashes elsewhere, in higher-frequency methods (you
  set path less often than you get it or a substring of it).
- ssize_t for strlen return values.
- Since shaver used a function pointer to consolidate creat/mkdir logic, but
  didn't fold the necessary close of the new fd returned by non-failing creat
  into the pointed-at function, I did that.
- AppendRelativePath forbids .. as a component (bounded by / or beginning or
  end of string on either side), not just in the middle of fragment (so that
  foo..bar is not an illegal relative pathname -- it should not be).  BTW,
  what the heck is the difference between NS_ERROR_FILE_UNRECOGNIZED_PATH and
  ...INVALID_PATH?
- SetLeafName was overallocating the new pathname buffer by failing to subtract
  the old leafname's length.
- CopyTo was failing to return an NSRESULT_FOR_ERRNO(), it just called that
  macro on a line by itself -- eek!  It also contained redundant if (newFD
  == nsnull) {...} cleanup code, it did a useless PR_GetFileInfo call, and it
  leaked FDs on read or write error.
- Implemented CopyToFollowingLinks as a forwarded call to CopyTo, Unix does
  not support "copying" a symlink via normal file i/o.  Should we instead
  lstat in CopyTo and if a link is the source of the copy, do readlink and
  then symlink?
- Fixed the readlink method (GetTarget) to null-terminate the link string in
  the out parameter (readlink does not do that for you).
- Lots of little nsnull vs. NULL vs. 0, == and != applied to boolean or null
  literals, white-space, indentation, bracing, comment, and sloppy code order
  (e.g., declaring an initialized variable that's not used till after early
  returns) fixes.  Also invert some return logic so that NS_OK is the normal,
  least indented, final return.
2000-09-19 00:22:41 +00:00
warren%netscape.com
9fc7180eb9 Added URL attribute to nsIFile (why: because (a) needs to vary for different implementations, and (b) need to factor out of necko for installer). Not implemented yet. 2000-09-12 08:05:13 +00:00
scc%mozilla.org
7d2020e4f9 fixing code that relied on implicit string construction 2000-08-20 07:18:09 +00:00
mscott%netscape.com
418070a7ab Landing branch fix to the trunk. bug #47248 --> Implement MoveTo for Unix. 2000-08-03 22:17:43 +00:00
conrad%ingress.com
a348a7e8c7 1. Added Get/SetPersistentDescriptor. Use this instead of GetPath/InitWithPath. 2. It is now possible to pass nsnull for the path param to NS_NewLocalFile(). This allows one to create an unspecified file. r = dougt 2000-07-17 15:03:05 +00:00
dougt%netscape.com
c555c3e7c1 Fixing bustage. 2000-07-12 23:59:33 +00:00
dougt%netscape.com
d84c495203 bug 40750.
Adding followSymlink flag to nsILocalFile.
Adjusting callers.
windows shortcut optimizations.
r=blizzard@mozilla.org.
a=brendan@mozilla.org
2000-07-12 23:31:31 +00:00
colin%theblakes.com
48f9742dca Remove VMS specific code; not needed any more. r,a=leaf 2000-07-06 20:11:38 +00:00
cls%seawood.org
b85f37fcb6 Given the statement "a == b ? c : d;" , the WorkShop 5.0 compiler expects c & d to be of the same type. 2000-06-27 06:10:21 +00:00
dougt%netscape.com
69db7ba963 Bug 43314.
r=Henry Sobotka <sobotka@axess.com>
a=brendan@mozilla.org
s=Robert O'Callahan <roc+moz@cs.cmu.edu>
2000-06-27 03:35:32 +00:00
warren%netscape.com
512c8bf433 Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433 2000-06-03 09:46:12 +00:00
pavlov%netscape.com
afefbe5a7d fix for unix filepicker not coming up correctly (bug #38810) 2000-05-10 23:41:33 +00:00
dougt%netscape.com
8104407afa InitWithPath should not store trailing seperatores in paths. It really is
an error to pass a trailing seperator, but we are just being kind.
2000-05-09 23:53:03 +00:00
dougt%netscape.com
afaefc04b1 Missed six chars. fixing bustage 2000-05-09 19:28:55 +00:00
dougt%netscape.com
a942da7d9f Fixes bug 38553. Using usecs now. r=sgehani@netscape.com 2000-05-09 19:11:14 +00:00
dp%netscape.com
7290a04bc1 - Api nsILocalFile::AppendRelativePath() added to interface
- nsILocalFile::Append() returns error uniformly on all platforms if
more than one component of path is being appended.
2000-05-05 05:47:32 +00:00
jim_nance%yahoo.com
5c44f0195a Fix for bug 34543. Compile problem under Tru64 Unix.
a=leaf.  This is #ifdefed for Tru64 Unix, but if it causes
bustage and I am not on IRC, you can get me at 919.859.3885
2000-04-05 22:37:01 +00:00