Index: src/http.c
==================================================================
--- src/http.c
+++ src/http.c
@@ -1,6 +1,6 @@
-/*
+/* 
 ** Copyright (c) 2007 D. Richard Hipp
 **
 ** This program is free software; you can redistribute it and/or
 ** modify it under the terms of the Simplified BSD License (also
 ** known as the "2-Clause License" or "FreeBSD License".)

Index: src/vfile.c
==================================================================
--- src/vfile.c
+++ src/vfile.c
@@ -117,10 +117,30 @@
   db_finalize(&ins);
   manifest_destroy(p);
   db_end_transaction(0);
 }
 
+
+/*
+** Poll db for current exe-status of a file.
+*/
+static int test_isexe(const char *zFilename, int vid){
+  static Stmt s;
+  int isexe;
+  db_static_prepare(&s,
+    "SELECT isexe"
+    " FROM vfile where vid=:vid AND pathname=:path"
+  );
+  db_bind_int(&s, ":vid", vid);
+  db_bind_text(&s, ":path", zFilename);
+  db_step(&s);
+  isexe = db_column_int(&s, 0);
+  db_reset(&s);
+
+  return isexe;
+}
+
 /*
 ** Check the file signature of the disk image for every VFILE of vid.
 **
 ** Set the VFILE.CHNGED field on every file that has changed.  Also 
 ** set VFILE.CHNGED on every folder that contains a file or folder 
@@ -169,10 +189,12 @@
       }
       chnged = 1;
     }else if( oldChnged>=2 ){
       chnged = oldChnged;
     }else if( rid==0 ){
+      chnged = 1;
+    }else if(file_isexe(zName)!=test_isexe(zName,vid)){
       chnged = 1;
     }
     if( chnged!=1 ){
       i64 origSize = db_column_int64(&q, 6);
       currentMtime = file_mtime(0);