e34268c265
From John Polstra <jdp@polstra.com>, via FreeBSD.
48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
$OpenBSD: patch-client_src_Updater_m3,v 1.1 2001/05/27 20:39:09 naddy Exp $
|
|
--- client/src/Updater.m3.orig Sun Apr 15 23:53:13 2001
|
|
+++ client/src/Updater.m3 Sun May 27 13:28:29 2001
|
|
@@ -733,7 +733,7 @@ PROCEDURE UpdateFile(self: T;
|
|
IF SupFileRec.Option.KeepBadFiles IN sfr.options THEN
|
|
Warn(self, "Bad version saved in " & tempPath);
|
|
ELSE
|
|
- DeleteFile(tempPath);
|
|
+ DeleteFile(self, tempPath);
|
|
END;
|
|
END;
|
|
END UpdateFile;
|
|
@@ -1231,7 +1231,7 @@ PROCEDURE Delete(self: T;
|
|
IF NOT SupFileRec.Option.CheckoutMode IN sfr.options THEN
|
|
(* Try the attic. *)
|
|
WITH atticName = SupMisc.AtticName(destPath) DO
|
|
- DeleteFile(atticName);
|
|
+ DeleteFile(self, atticName);
|
|
(* We always delete the Attic directory when it becomes empty.
|
|
FIXME - Is that the right thing to do?. *)
|
|
TRY
|
|
@@ -1239,7 +1239,7 @@ PROCEDURE Delete(self: T;
|
|
EXCEPT OSError.E => (* Ignore. *) END;
|
|
END;
|
|
END;
|
|
- DeleteFile(destPath);
|
|
+ DeleteFile(self, destPath);
|
|
IF SupFileRec.Option.CheckoutMode IN sfr.options
|
|
OR NOT self.proto.v.dirsAreExplicit THEN
|
|
(* Delete the directory automatically if it is now empty. *)
|
|
@@ -1280,14 +1280,13 @@ PROCEDURE MakeDirectories(path: Pathname
|
|
END;
|
|
END MakeDirectories;
|
|
|
|
-PROCEDURE DeleteFile(path: Pathname.T)
|
|
- RAISES {Error} =
|
|
+PROCEDURE DeleteFile(self: T; path: Pathname.T) =
|
|
BEGIN
|
|
TRY
|
|
FileAttr.Delete(path);
|
|
EXCEPT OSError.E(l) =>
|
|
IF l.head # EnoentAtom THEN
|
|
- RAISE Error("Cannot delete \"" & path & "\": " &
|
|
+ Warn(self, "Cannot delete \"" & path & "\": " &
|
|
ErrMsg.StrError(l));
|
|
END;
|
|
END;
|