mirror of https://github.com/apache/archiva.git
take care about using full file path on delete
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308259 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c3ee919adc
commit
2b730d9a8d
|
@ -180,7 +180,8 @@ public class DefaultFileUploadService
|
|||
{
|
||||
File file = new File( SystemUtils.getJavaIoTmpDir(), fileName );
|
||||
log.debug( "delete file:{},exists:{}", file.getPath(), file.exists() );
|
||||
boolean removed = getSessionFileMetadatas().remove( new FileMetadata( fileName ) );
|
||||
boolean removed = getSessionFileMetadatas().remove(
|
||||
new FileMetadata( SystemUtils.getJavaIoTmpDir().getPath() + "/" + fileName ) );
|
||||
if ( file.exists() )
|
||||
{
|
||||
return file.delete();
|
||||
|
@ -194,7 +195,7 @@ public class DefaultFileUploadService
|
|||
List<FileMetadata> fileMetadatas = new ArrayList( getSessionFileMetadatas() );
|
||||
for ( FileMetadata fileMetadata : fileMetadatas )
|
||||
{
|
||||
deleteFile( fileMetadata.getServerFileName() );
|
||||
deleteFile( new File( fileMetadata.getServerFileName() ).getName() );
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue