Merge pull request #4 from the1311/fix-div-by-zero-in-recovery.py
fix division by zero if less than 100 files are copied
This commit is contained in:
commit
cfd0496a28
|
@ -96,7 +96,10 @@ while ((destination is None) or (not os.path.exists(destination))):
|
|||
destination = input('Enter a valid destination directory\n')
|
||||
|
||||
fileNumber = getNumberOfFilesInFolderRecursively(source)
|
||||
onePercentFiles = int(fileNumber/100)
|
||||
if fileNumber > 100:
|
||||
onePercentFiles = int(fileNumber/100)
|
||||
else:
|
||||
onePercentFiles = fileNumber
|
||||
totalAmountToCopy = str(fileNumber)
|
||||
print("Files to copy: " + totalAmountToCopy)
|
||||
|
||||
|
|
Loading…
Reference in New Issue