AS 2.52 beta 1: Unzip and long paths

Discussion of bugs and problems found in Altap Salamander. In your reports, please be as descriptive as possible, and report one incident per report. Do not post crash reports here, send us the generated bug report by email instead, please.
Eric
Posts: 77
Joined: 28 Apr 2006, 22:52

AS 2.52 beta 1: Unzip and long paths

Post by Eric »

Often I get an error when I try to unzip an archive:
"Error: Cannot extract file because of too long path name".

The path is longer than 206 chars, perhaps longer than 255.

Will this be fixed?

Thanks
Eric

(Vista 64 Bit)
User avatar
SelfMan
Posts: 1155
Joined: 05 Apr 2006, 20:51
Contact:

AS 2.52 beta 1: Unzip and long paths

Post by SelfMan »

Its not about Salamander or VISTA. Its about NTFS and its limits. See: http://msdn.microsoft.com/en-us/library/aa365247.aspx
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: AS 2.52 beta 1: Unzip and long paths

Post by Ether »

Hi Eric, have you tried unzipping the archive using another program to the same location? Does it work?
In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters.
@SelfMan] It is a Windows limitation. Bare NTFS supports longer paths, but common Windows functions support only 260 characters.
Ελληνικά rulez.
User avatar
zarevak
Plugin Developer
Plugin Developer
Posts: 789
Joined: 04 Feb 2006, 16:49
Location: Prague, Czech Republic

Re: AS 2.52 beta 1: Unzip and long paths

Post by zarevak »

ether wrote:@SelfMan] It is a Windows limitation. Bare NTFS supports longer paths, but common Windows functions support only 260 characters.
There are two version of paths under Windows. Regular paths and Unicode paths prepended with \\?\. Most programs don't support these Unicode paths because 260 characters long path is enough in most cases.

For more information: MSDN: File Names, Paths, and Namespaces
The "\\?" prefix tells the Win32 APIs to disable all string parsing and to send this string straight to the file system. For example, if the file system supports large paths and file names, you can exceed the MAX_PATH limits that are otherwise enforced by the Win32 APIs. This also allows you to turn off automatic expansion of ".." and "." in the path names. Many but not all file APIs support "\\?"; you should look at the reference topic for each API to be sure.
User avatar
SelfMan
Posts: 1155
Joined: 05 Apr 2006, 20:51
Contact:

Re: AS 2.52 beta 1: Unzip and long paths

Post by SelfMan »

I've made a simple test just to make it clear.
On my D:\ drive (ntfs) I've tried to create a folder with 287 characters.
Salamander said "the path specifies is too long". Explorer created the folder but cut the filename to 245 characters automatically. Explorer was unable to create subfolders or files in there ("new folder" is too long). And so was Salamander. Except of beeing able to create a file with the name length of 11 characters (1234567.txt).

So limits are there. No matter if NTFS supports it or not. Explorer dosn't alow to type \\?\ nor does Salamander.

I assume that the files you want to extract are comming from a different filesystem then windows run with. Unless MS rewrites windows UI, I don't see the possibility of longer paths. The users who would need this is negligible.
Post Reply