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;