avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl FileSource.java
Date Fri, 07 Nov 2003 08:15:45 GMT
cziegeler    2003/11/07 00:15:45

  Modified:    sourceresolve/src/java/org/apache/excalibur/source/impl
                        FileSource.java
  Log:
  Applying patch from jal@argo-tec.de (J?Albertsen) for checking the result of the rename
operation
  
  Revision  Changes    Path
  1.9       +7 -2      avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/FileSource.java
  
  Index: FileSource.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/FileSource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FileSource.java	8 Jul 2003 15:11:47 -0000	1.8
  +++ FileSource.java	7 Nov 2003 08:15:45 -0000	1.9
  @@ -526,7 +526,12 @@
                           m_source.getFile().delete();
                       }
                       // Rename temp file to destination file
  -                    m_tmpFile.renameTo(m_source.getFile());
  +                    if (!m_tmpFile.renameTo(m_source.getFile())) 
  +                    {
  +                       throw new IOException("Could not rename " + 
  +                         m_tmpFile.getAbsolutePath() + 
  +                         " to " + m_source.getFile().getAbsolutePath());
  +                    }
   
                   }
                   finally
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message