From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0K3ADKiFG2L7PQAAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 15:07:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QNg9CaiFG2IbAgAAauVa8A (envelope-from ) for ; Sun, 27 Feb 2022 15:07:36 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E80D72D35A for ; Sun, 27 Feb 2022 15:07:35 +0100 (CET) Received: from localhost ([::1]:49422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOKD0-0000z5-Ox for larch@yhetil.org; Sun, 27 Feb 2022 09:07:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOK10-0000Xd-0O for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:13 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOK0x-0001tZ-0H for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOK0w-0004up-Ux for guix-patches@gnu.org; Sun, 27 Feb 2022 08:55:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54180] [PATCH 04/12] home: symlink-manager: Use 'file-is-directory?'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 13:55:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54180 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54180@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 54180-submit@debbugs.gnu.org id=B54180.164597007018768 (code B ref 54180); Sun, 27 Feb 2022 13:55:06 +0000 Received: (at 54180) by debbugs.gnu.org; 27 Feb 2022 13:54:30 +0000 Received: from localhost ([127.0.0.1]:57178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOK0M-0004sY-Cb for submit@debbugs.gnu.org; Sun, 27 Feb 2022 08:54:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOK0A-0004qG-Pn for 54180@debbugs.gnu.org; Sun, 27 Feb 2022 08:54:23 -0500 Received: from [2001:470:142:3::e] (port=50234 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOJzu-0001ZT-Fp; Sun, 27 Feb 2022 08:54:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Iu6fW84CZKtG3DrzzEXHBBf/kxZvuu3PydhwG5xiicQ=; b=Difn/DnBQW8tY8Rs877v dOwBCzxQnzkpyA+qKWlmfjQhY/NRX8V8EiunXft4s4mCoAhCCuNHJ8dkLO87j8HotqfKlSN8jLbVd AV9HcDmo+F4toy3Iv2w0/mWAP4peTMZ2BlJDLap1CcDlyp1BUy/tou/3QgA4INgEsgLLKRNQkelZK ptrdykxIDayO4jKbK+CpMv/aZl5fvBGTLMVPoxixVSNpcjetp0mdReZlJxTuf8lFqtVfn5uX+nWHK OepMaj7M44YtvfjrSYe4uidcv5tmiS9/FHUjVKRyD4oe79d87cDJK6RY+y9cn63YJX01beQxLMy8+ EIiCXNSqCb2N8w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55804 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOJzs-0007Pg-SH; Sun, 27 Feb 2022 08:54:02 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 27 Feb 2022 14:53:34 +0100 Message-Id: <20220227135342.10296-4-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220227135342.10296-1-ludo@gnu.org> References: <20220227135342.10296-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645970855; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Iu6fW84CZKtG3DrzzEXHBBf/kxZvuu3PydhwG5xiicQ=; b=DVmClAlNQdTVx4aP+9wFUEKJItafRte/MSHIi7F643Pgo2K38Ksm22SsdQzEYYbwV22t0y 4ZNRFYU7LtVeYATmfTqfJ7EqlGBK8cooe+1NVaYLvmaTVbRNx7UsJlnl/BZkUSJSqI8r3j 8e23nYJYUTX83N0ginMN4w0tfXqK8JI7n2fuO6z3kg7oTypLEHV5bCleNvj0a7mjzU5Gj6 FU3RKbtDN2opR7Pqb1OKNcAWLmOGNNGZukUYclms1I1CPx5CXMK5toXhiOWQsidVfJkQe/ HoanCZ53aoAn4TrrvNi0ruVj2L9Qm4RFH1HYo4PlmdUjoZe/FxZ6rAG6R2kzUA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645970855; a=rsa-sha256; cv=none; b=LquRmxNxApJEldDS/4JU9YHSNDP4U7nQGAaIAhT+AcyKhtTxQ3EwMVCAZufO6tS8z9slQm t7MIWEy7VXAZkBt442slcxkS85aSkPyD8CDs0CB1+cBj88T4e1hO8ZOXCoeiLfaMqmeOGA JZvNSV0cPADNWFiWj11QEDwMO9g5gIP8qongGaCpEDsJVCSRo1j+XGBTWrUMo0NKlySMJR 4Ibdl3DschYLiqBSN9KWmLOaMADwUIlZAUEeeV4zcOARoHAGqRt7+HudiQsi6vmDZLqDle LcR5TD32XqnPZlH9wy/pVgwkTEmcRCeRD0ENgY5KQ9tGFePnMaFy7cycq06jng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="Difn/DnB"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="Difn/DnB"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E80D72D35A X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: lcY9YfMKYg7G * gnu/home/services/symlink-manager.scm (update-symlinks-script)[directory?]: Remove. Change callers to use 'file-is-directory?' instead. --- gnu/home/services/symlink-manager.scm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm index a6344c808f..f133eb17f2 100644 --- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -101,9 +101,6 @@ (define (get-target-path path) (define (get-backup-path path) (string-append backup-dir "/." path)) - (define (directory? path) - (equal? (stat:type (stat path)) 'directory)) - (define (empty-directory? dir) (equal? (scandir dir) '("." ".."))) @@ -133,7 +130,7 @@ (define (cleanup-symlinks old-tree) (('dir . path) (if (and (file-exists? (get-target-path path)) - (directory? (get-target-path path)) + (file-is-directory? (get-target-path path)) (empty-directory? (get-target-path path))) (begin (format #t (G_ "Removing ~a...") @@ -179,7 +176,7 @@ (define (get-source-path path) (('dir . path) (let ((target-path (get-target-path path))) (when (and (file-exists? target-path) - (not (directory? target-path))) + (not (file-is-directory? target-path))) (backup-file path)) (if (file-exists? target-path) -- 2.34.0