Page 1 of 1

Wrong(cutting) filesnames if folder name is longer than ~160

PostPosted: Sun Dec 18, 2011 5:07 am
by BigMike71
hi, since iam using version >6.11 i have some errors by downloading files to an folder named for subject , if the subject name is longer ~ 160pcs !
i am using 64bit version 6.21 b 1534 withwindows 7 64bit
some strange renaming of the files are appear.
if i using download to folder named for subject i have destroyed file names and the files are not working because they are named like .xxx.xxx.xxx.xxx.vol15+9.par2_yEnc.nb2.!
when download to an new folder with short name all files are good.

sorry for bad english, hope you understand the problem.

Re: Wrong(cutting) filesnames if folder name is longer than

PostPosted: Sun Dec 18, 2011 10:56 am
by DThor
Yes, I believe some measures were taken with a recent release to help with this, but it's still possible to break it, I guess. If you think you're going to be doing this a lot, try setting the download directory to a more 'shallow ' location, like E:\DL. It's a limitation of the filesystem.

Actually there's a 'cleaner' option, you can now set the path to where the un-rarring happens - under Options/Autopar/Override Unrar Path. Just set that to somewhere you have permissions but is 'shallow', and that might make your problems go away if it's related to the unrar process.

DT

Re: Wrong(cutting) filesnames if folder name is longer than

PostPosted: Sun Dec 18, 2011 11:45 am
by Quade
As D says. There's a windows wide 255 char limit to how long the path and the filename combined can be. If you make it longer than that, Windows explorer can't process the files. Considering that that's a hard limit. You have to live within that limit. So, path name, path in RAR file name and filename all combined have to be under 255 characters. Newin will strip down the path and filenames if it has to to land the files but, there's only so much it can do.

Re: Wrong(cutting) filesnames if folder name is longer than

PostPosted: Sun Dec 18, 2011 4:47 pm
by tl
Quade wrote:As D says. There's a windows wide 255 char limit to how long the path and the filename combined can be. If you make it longer than that, Windows explorer can't process the files. Considering that that's a hard limit. You have to live within that limit. So, path name, path in RAR file name and filename all combined have to be under 255 characters. Newin will strip down the path and filenames if it has to to land the files but, there's only so much it can do.

Actually, it depends on which Windows API you use, assuming IIRC Windows NT or newer.

The old API has a 260-char restriction for the full path, including drive letter. The newer Unicode enabled API has a 32,767 unicode entity limit and usually a 255 entity per "component" (directory or filename), but the later is a per-filesystem setting ("entity" is basically character).

No big prize for correctly guessing that MS uses the old API in their Explorer and a few other of their programs. As I understand it most other programs handles it fine, this includes several (all?) of the third-part Explorer replacements and many of MS's other programs.

I first ran into this on Windows XP when I managed to creath paths in Cygwin that couldn't be accessed via Explorer, nor deleted via it because it tries to traverse it first... Everything else I could find had no problems with it, but I could have missed something. And "subst" or junction points can be used to access valid long pathnames via a shorter pathname!

So it might be technically possible to implement but the Explorer issue makes it painful. There's also a number of smaller gotchas due to other functions that is limited to PATH_MAX (260 characters) and thus needs to be reimplemented by the programmer.

Re: Wrong(cutting) filesnames if folder name is longer than

PostPosted: Sun Dec 18, 2011 5:12 pm
by Quade
Yeah I can do it but, then the complaints would be endless.

- "Why can't I delete this file"

- "Why can't I view this file".

Asking people to use some third party software to access the files on their disks is a non-starter. I suppose I could consider making it optional.