From 0d368c3398f593fd65d0404059fedfe12005f551 Mon Sep 17 00:00:00 2001 From: KRKeegan Date: Mon, 22 Jul 2013 21:25:37 -0700 Subject: [PATCH] Insteon: Fix Path Comparison in Windows for Update_Docs.pl If inode==0 then we are probably on windows, so use abs_path to compare the two paths and see if they are the same. I don't have windows so hopefully this works. Fixes hollie/misterhouse#234 --- bin/update_docs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/update_docs b/bin/update_docs index 2ca9526ce..802edd75c 100755 --- a/bin/update_docs +++ b/bin/update_docs @@ -60,6 +60,7 @@ BEGIN { use strict; use warnings; use Pod::Html; +use Cwd qw(abs_path); # Get parms from mh.ini require 'handy_utilities.pl'; @@ -242,7 +243,8 @@ closedir POD; # delete html files from docs dir if out dir is diff and pod exists my $docsi = ( stat($docdir) )[1]; my $outi = ( stat($outdir) )[1]; -if ( $docsi eq $outi ) { +if ((($docsi == $outi) && ($outi == 0) && (abs_path($docdir) eq abs_path($outdir))) + || (( $docsi eq $outi ) && ($outi != 0))) { print "you should set the html_alias2_docs directory to a place outside" . " the mh distribution\n directory. Otherwise, everytime this script is" . " run, you will alter\n your distribution files.";