From c06fc39c39a287ca4e42fcc25ccc0c91d0fb3b99 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 4 Sep 2008 10:59:49 +0000 Subject: [PATCH] Arreglo en el servidor para que antes de borrar se mire si existe git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@562 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- .../Servidor/srvGestorDocumentos_Impl.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Modulos/Gestion de documentos/Servidor/srvGestorDocumentos_Impl.pas b/Source/Modulos/Gestion de documentos/Servidor/srvGestorDocumentos_Impl.pas index 91d761ab..d37745d4 100644 --- a/Source/Modulos/Gestion de documentos/Servidor/srvGestorDocumentos_Impl.pas +++ b/Source/Modulos/Gestion de documentos/Servidor/srvGestorDocumentos_Impl.pas @@ -147,7 +147,10 @@ begin TRdxAlmacenes_Presupuestos: begin Ruta := Ruta + CTE_ALMACEN_PRESUPUESTOS + IntToStr(ID) + '\' + NombreFichero; - Result := DeleteFile(Ruta); + if FileExists(Ruta) then + Result := DeleteFile(Ruta) + else + Result := True; //Ya ha sido borrado end; end; finally @@ -168,7 +171,8 @@ begin TRdxAlmacenes_Presupuestos: begin Ruta := Ruta + CTE_ALMACEN_PRESUPUESTOS + IntToStr(ID); - Deltree(Ruta, True); + if DirectoryExists(Ruta) then + Deltree(Ruta, True); Result := True; end; end;