diff --git a/p4RemoveUnversioned.py b/p4RemoveUnversioned.py index 91b2bb4..3231267 100644 --- a/p4RemoveUnversioned.py +++ b/p4RemoveUnversioned.py @@ -5,7 +5,7 @@ # todo: switch to faster method of calling p4 fstat on an entire directory and parsing it's output # todo: add option of using send2trash -import inspect, os, re, subprocess, sys, traceback +import inspect, os, re, stat, subprocess, sys, traceback re_remove_comment = re.compile( "#.*$" ) @@ -118,6 +118,7 @@ def main( ): continue print( "| " + file + " is unversioned, removing it." ) + os.chmod( path, stat.S_IWRITE ) os.remove( path ) dirs_copy = dirs