Changeset 242


Ignore:
Timestamp:
11/14/02 15:33:29 (20 years ago)
Author:
piso
Message:

deleteRename(): log a warning if source file does not exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/Utilities.java

    r197 r242  
    33 *
    44 * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: Utilities.java,v 1.4 2002-11-04 15:38:57 piso Exp $
     5 * $Id: Utilities.java,v 1.5 2002-11-14 15:33:29 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    800800    public static boolean deleteRename(File source, File destination)
    801801    {
     802        if (!source.isFile()) {
     803            Log.warn("deleteRename source file " + source + " does not exist");
     804            return false;
     805        }
    802806        // The delete/rename operation sometimes fails on NT at first, but then
    803807        // succeeds later, so we do some retries here if necessary.
     
    910914    private static boolean overwriteFile(File source, File destination)
    911915    {
    912         if (!source.exists() || !source.isFile())
     916        if (!source.isFile())
    913917            return false;
    914918        boolean error = false;
Note: See TracChangeset for help on using the changeset viewer.