Commit Graph
208 Commits
Author SHA1 Message Date
[email protected] d8d493b4d4 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
[email protected] 67b5dca391 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
[email protected] a9aa77073f Header include dependency cleanup. b=64023 r=jag rs=brendan 2001-07-16 02:40:48 +00:00
[email protected] f7bdb3ff80 Adding default string in Normalize to allow Purify to run under Solaris. [email protected], [email protected] 2001-07-09 23:42:00 +00:00
[email protected] 1af7019615 Beos build bustage - 82205 2001-06-30 20:26:40 +00:00
[email protected] 39dd392a98 Fix for nsIFile IsSpecial. r=dougt sr=jst b=82205
Checking this in for tenthumbs.

--pete
2001-06-30 13:30:32 +00:00
[email protected] 5d87fc5757 Fix for nsIFile GetTarget method.
r=dougt sr=jst b=88032

--pete
2001-06-29 17:43:59 +00:00
[email protected] 75c7e6cf10 fixing ports bustage 2001-06-29 17:39:25 +00:00
[email protected] a9cb9b6682 Fix for broken nsIFile method IsSymlink
b=81927 r=blizzard sr=jst

--pete
2001-06-28 12:03:47 +00:00
[email protected] 5ee35f501a 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
[email protected] 8afc81e0b2 Landing url parsing branch. 73845. [email protected], [email protected], [email protected].
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
[email protected] ee1d678864 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
[email protected] 5bd5ed0458 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
[email protected] fdd9d9260a won't compile without long long type. Using LL_ macros instead. [email protected], [email protected], b=75815 2001-04-26 05:28:31 +00:00
[email protected] 5f97600310 bug 71393, miscalculates free space on large drives. Contributed by [email protected] and [email protected], [email protected]/[email protected] 2001-04-18 04:30:26 +00:00
[email protected] 3b71e3feb7 bug 42704 missing initialization in nsLocalFile::GetFileSize, r=dougt/sr=mscott 2001-02-07 00:14:33 +00:00
[email protected] 333119bab5 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
[email protected] 1cb25dc563 Fix the BeOS implementation of Normalize().
Thanks to Hiromasa Kato <[email protected]> for the patch.
Bug #53014 [email protected] [email protected]
2000-11-28 01:43:09 +00:00
[email protected] 73a7256e38 OpenVMS specific fix for defeciency in stat.
b=60199 r=dougt a=waterson
2000-11-27 11:19:41 +00:00
[email protected] 0462ea4ce8 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
[email protected] 7730ce0cd3 Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson 2000-10-27 22:43:51 +00:00
[email protected] ddcfb2fb62 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
[email protected] 091d92ceb1 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
[email protected] cbe3570c6e fixing code that relied on implicit string construction 2000-08-20 07:18:09 +00:00
[email protected] 3de7012f6f Landing branch fix to the trunk. bug #47248 --> Implement MoveTo for Unix. 2000-08-03 22:17:43 +00:00
[email protected] 09fbe88289 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
[email protected] 8ede0dd043 Fixing bustage. 2000-07-12 23:59:33 +00:00
[email protected] 571c5403a5 bug 40750.
Adding followSymlink flag to nsILocalFile.
Adjusting callers.
windows shortcut optimizations.
[email protected].
[email protected]
2000-07-12 23:31:31 +00:00
[email protected] 56c24b1029 Remove VMS specific code; not needed any more. r,a=leaf 2000-07-06 20:11:38 +00:00
[email protected] a216e546e9 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
[email protected] 98c166ab5b Bug 43314.
r=Henry Sobotka <[email protected]>
[email protected]
s=Robert O'Callahan <[email protected]>
2000-06-27 03:35:32 +00:00
[email protected] 6a06dfc026 Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433 2000-06-03 09:46:12 +00:00
[email protected] 0fd54f6ed2 fix for unix filepicker not coming up correctly (bug #38810) 2000-05-10 23:41:33 +00:00
[email protected] 7fbb0775b8 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
[email protected] 7fd8c4a31d Missed six chars. fixing bustage 2000-05-09 19:28:55 +00:00
[email protected] 7c8e6dc7c5 Fixes bug 38553. Using usecs now. [email protected] 2000-05-09 19:11:14 +00:00
[email protected] 53f1fe2699 - 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
[email protected] 5829edc89a 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
[email protected] 27aff31fa7 Changes to get the BeOS build running. Patch provided by Yannick Koehler <[email protected]> . 2000-04-05 02:12:26 +00:00
[email protected] 4df9dd4b99 Making string conversions explicit. 2000-04-04 09:35:51 +00:00
[email protected] eb3799cdf3 checkin patches to implement nsILocalFile::GetDiskSpaceAvailable from Jason Eager and nsIFile::GetParent from pavlov. r=pavlov,blizzard,dougt. a=dougt 2000-04-01 20:07:14 +00:00
[email protected] 28c0317439 Fixing nsIFile::SetLastModificationDate for Unix.
b = 12368
r = ssu
2000-03-27 22:04:46 +00:00
[email protected] 8533bcaca3 fix for bug #18186. remove work around in layout code and properly implement nsIFile::GetLastMofificationDate() on unix. r=vidur,jst,dougt a=waterson 2000-03-15 03:08:28 +00:00
[email protected] 0fe2ad9a6e fix for 28942 nsILocalFile::Exists() returns a FILE_NOT_FOUND error.
[email protected]
2000-03-14 05:11:02 +00:00
[email protected] 90e6ffd47b Bug 21556: Making linux be thread-safe. Making tons of classes implement threadsafe AddRef/Release. a=jar 2000-03-05 21:26:01 +00:00
[email protected] d3d8f93f06 Explicitly cast mPath to const char* as some compilers can't automatically cast from nxXPIDLCString to char * . 2000-02-26 00:13:30 +00:00
[email protected] 8448567293 Implement the equivalent of Unix's realpath() for BeOS. Build blocker. a=leaf 2000-02-24 00:48:30 +00:00
[email protected] ce20637201 change nsIFile::Spawn to take an array of arguments instead of just a single flat string. bug #27843. r=dougt, a=chofmann. also, implement nsIFile::Normalize for unix. bug #17948. r=shaver, a=chofmann 2000-02-17 15:35:54 +00:00
[email protected] ab469c065e Make filespec comparisons case-blind for OpenVMS. Fix build problem for OpenVMS. r=dougt 2000-02-10 10:54:55 +00:00
[email protected] 5579ea61b6 Fixing build bustage. 2000-02-09 08:47:51 +00:00