From: Calin Crisan Date: Sat, 5 Jul 2014 17:33:56 +0000 (+0300) Subject: only writable partitions are listed as available X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=09aa5bb2d90e721e69aa987587f98fe60addbf7f;p=motioneye-debian only writable partitions are listed as available --- diff --git a/src/diskctl.py b/src/diskctl.py index e570151..7b3f675 100644 --- a/src/diskctl.py +++ b/src/diskctl.py @@ -37,10 +37,13 @@ def _list_mounts(): mount_point = parts[1] fstype = parts[2] opts = parts[3] + + if not os.access(mount_point, os.W_OK): + continue if fstype == 'fuseblk': fstype = 'ntfs' # most likely' - + logging.debug('found mount "%s" at "%s"' % (target, mount_point)) mounts.append({