This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Bug fix in folderstats module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: arshdeepbal, serhiy.storchaka
Priority: normal Keywords:

Created on 2019-09-17 10:05 by arshdeepbal, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg352626 - (view) Author: Arshdeep (arshdeepbal) Date: 2019-09-17 10:05
Issue :
While using folderstats module in python3, the records are cascaded from all previous runs of folderstats for that specific session i.e. once the folderstats is run, it will provide the dataframe with all the files/directories in that directory, but if we run it another time, the new data is appended to the old data.

To overcome this issue you can make a minor change in the folderstats module and import it :
init.py : [attached]
In method folderstats() edit the below line to make an addition i.e initialise items=list() so as the data is not appended to the previous list :

idx, items, foldersize, num_files = _recursive_folderstats(
folderpath,
hash_name=hash_name,items=list()
ignore_hidden=ignore_hidden,
verbose=verbose)
msg352627 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-17 10:21
This tracker is for bugs in the C implementation of Python. "foldersize" is not a module from the standard Python library. Use the corresponding bug tracker for reporting a bug in third-party modules.
History
Date User Action Args
2022-04-11 14:59:20adminsetgithub: 82377
2019-09-17 10:21:48serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg352627

resolution: third party
stage: resolved
2019-09-17 10:05:42arshdeepbalcreate