Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when selecting greater than or equal to 42 files to be shredded - Windows #348

Closed
SpyTec opened this Issue May 22, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@SpyTec
Copy link

SpyTec commented May 22, 2018

When selecting greater than or equal to 42 files to be shredded on Windows, it doesn't show the items to be deleted but rather exception in browse_files().

  • BleachBit 2.0
  • Windows 8.1

Steps taken:

  1. Launch Bleachbit
  2. Select Shred files
  3. Mark 42 files or more to be shredded
  4. See error exception in browse_files() displayed on right container

Each file is 23 characters long including file extension. Folder path is 22 characters long

@az0

This comment has been minimized.

Copy link
Member

az0 commented May 22, 2018

@SpyTec Thanks for the well-written bug report

I tried it with 50 files with short names, and it did not happen. When I made the filenames longer, I saw

exception in browse_files()
Traceback (most recent call last):
  File "\bleachbit\Windows.py", line 97, in browse_files
    Title=title)
error: (12291, 'GetOpenFileNameW', 'No error message is available')

@az0 az0 added the bug label May 22, 2018

@az0

This comment has been minimized.

Copy link
Member

az0 commented May 22, 2018

By the way, for now here are workarounds

  1. Delete fewer files in each batch, of course :)
  2. Drag files and drop onto application (however, this does not work in administrator mode because of a security limitation in Windows itself)
  3. Use the new copy and paste feature in BleachBit 2.2 (available from ci.bleachbit.org)

az0 added a commit that referenced this issue Jun 3, 2018

Fix: allow selecting many files on Windows
This increases the buffer length by 10x

Symptom
error: (12291, 'GetOpenFileNameW', 'No error message is available')

Reported by SpyTec
#348

Hack thanks to Tim Roberts
@az0

This comment has been minimized.

Copy link
Member

az0 commented Jun 3, 2018

This was fixed in commit 721ec92

The problem was the buffer length was 1024 bytes, so I increased it to 10,240 bytes. The number of files will vary depending on the length of the pathnames, and in my test I was able to delete over 100 long filenames with the fix.

In about ten minutes a build with the fix will be posted to ci.bleachbit.org, and it will be version 2.0.721. You can test this or most any newer version there. Let me know how it goes.

@az0 az0 closed this Jun 3, 2018

@az0 az0 added this to the 2.2 milestone Jun 3, 2018

@az0

This comment has been minimized.

Copy link
Member

az0 commented Mar 4, 2019

The fix was published in BleachBit 2.1 beta. Please try it out, and let me know how it goes.

Soon the fix will be published also in BleachBit 2.2 final.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.