Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
args = parseArgs( args )
# Convert the comma separated list of key[=value] options into a dictionary for fusepy
fusekwargs = dict( [ option.split( '=', 1 ) if '=' in option else ( option, True )
for option in args.fuse.split( ',' ) ] ) if args.fuse else {}
if args.prefix:
fusekwargs['modules'] = 'subdir'
fusekwargs['subdir'] = args.prefix
if args.mount_point in args.mount_source:
fusekwargs['nonempty'] = True
global printDebug
printDebug = args.debug
fuseOperationsObject = TarMount(
pathToMount = args.mount_source,
clearIndexCache = args.recreate_index,
recursive = args.recursive,
gzipSeekPointSpacing = args.gzip_seek_point_spacing,
mountPoint = args.mount_point )
fuse.FUSE( operations = fuseOperationsObject,
mountpoint = args.mount_point,
foreground = args.foreground,
nothreads = True, # Can't access SQLite database connection object from multiple threads
**fusekwargs )