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

FANBOX: Filename too long causes Invalid Argument #1175

Closed
3 tasks done
shinji257 opened this issue Sep 28, 2022 · 7 comments
Closed
3 tasks done

FANBOX: Filename too long causes Invalid Argument #1175

shinji257 opened this issue Sep 28, 2022 · 7 comments

Comments

@shinji257
Copy link

Prerequisites

  • Did you read FAQ section in readme.md?
  • Did you test with the latest releases or commit ? Release version
  • Did you search for existing issues in Issues?

Description

When the filename ends up being too long due to a really long title it causes Windows to throw error 22 (Invalid Argument) messages and it fails to continue. I believe this is a return of an old bug from 2019 #525

Steps to Reproduce

  1. Run PixivUtil2
  2. Choose F3 (specific post)
  3. Enter post 2277564

Note that post is very much NSFW and require support to get.

Expected behavior: Filename either remove title or truncated

Actual behavior: Errors as logged.

Log file:
pixivutil.log

Versions

PixivDownloader2 version 20220924

@Nandaka
Copy link
Owner

Nandaka commented Sep 29, 2022

you can try to enable long filename/path support in win10
https://www.itprotoday.com/windows-10/enable-long-file-name-support-windows-10

@shinji257
Copy link
Author

It's already enabled for me.
image

@Nandaka
Copy link
Owner

Nandaka commented Sep 29, 2022

weird, it is working in when I try from python console.
Is your target drive formatted using NTFS? Long filename only supported if you are using NTFS, I think?
image

https://github.com/Nandaka/PixivUtil2/blob/master/PixivHelper.py#L764

@shinji257
Copy link
Author

I'm actually using a network drive so maybe it is samba not supporting but the network host is Linux. It should be fine (in theory). Anyways I'll try this post on a local location with ntfs and see if the issue goes away and update this with the result when I do.

@Nandaka
Copy link
Owner

Nandaka commented Sep 29, 2022

ok, it is kinda similar with my case, but the Z: drive is actually another win10 shared folder.

@shinji257
Copy link
Author

shinji257 commented Sep 29, 2022

Ok. It works fine on a local NTFS formatted drive, but it won't copy to the network drive.

EDIT: Just to clarify it won't copy via any means (but reducing the length by 12 did let the files copy over) so it isn't a PixivUtil2 specific issue but I'm leaving this open in case you want to do something about it at all.

@shinji257
Copy link
Author

So just a small update. This is due to Linux path limitations since the SMB share is hosted there in the end. Just to double check I had zipped the affected files up, uploaded to the server, then tried to unpack (via a shell -- not SMB) and same error. The same issue may not present itself on a Windows based SMB share and is not a SMB issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants