Ful path too long. Really?

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.
User avatar
crystalidea
Posts: 205
Joined: 09 Dec 2005, 15:13
Contact:

Ful path too long. Really?

Post by crystalidea »

Why can't I delete a long path? Windows Explorer is able to do that. Do you use MAX_PATH?
Have to open Windows Explorer to delete a folder :cry:

---------------------------
Error
---------------------------
Name "testing_6_automating_with_continuous_integration.html" with full path is too long.

Path: C:\Xcode_6_extracted\Xcode.app\Contents\Developer\Documentation\DocSets\com.apple.adc.documentation.Xcode.docset\Contents\Resources\Documents\documentation\DeveloperTools\Conceptual\testing_with_xcode\testing_6_automating_with_continuous_integration
---------------------------
[Skip] [Skip All] [Cancel]
---------------------------
therube
Posts: 674
Joined: 14 Dec 2006, 06:22

Re: Ful path too long. Really?

Post by therube »

249 characters, so you're right around the limit.
Oh, 254 characters with .html tacked on.
While Windows Explorer may work, not all Windows utilities will.

Perhaps (or something like):
Everything uses SHFileOperation to delete files.
SHFileOperation is limited to 260 characters.

What Everything should do for a future release is check if SHFileOperation fails and try DeleteFile/RemoveDirectory...
http://www.voidtools.com/forum/viewtopi ... 388#p10636
WinXP Pro SP3 or Win7 x86 | SS 2.54
User avatar
crystalidea
Posts: 205
Joined: 09 Dec 2005, 15:13
Contact:

Re: Ful path too long. Really?

Post by crystalidea »

Got it. It's because DeleteFileA is limited to MAX_PATH
DeleteFileW is able to use 32,767 characters.

2015 year and no unicode :( :( :(
-=Majkl=-
Posts: 80
Joined: 12 Dec 2005, 14:51
Location: Brno, Czech Republic
Contact:

Re: Ful path too long. Really?

Post by -=Majkl=- »

AS, as a "low-level" file manager should be able to work with such long paths. It should definitely warn user that such paths may not work with another applications, when the user is trying to create too long paths... but it is a tool for power users who need this, even for renaming such long path to shorter.

The question is: what other tool should I choose for such tasks? TC? Do you really want to users switch to another file manager just for such simple tasks?
User avatar
crystalidea
Posts: 205
Joined: 09 Dec 2005, 15:13
Contact:

Re: Ful path too long. Really?

Post by crystalidea »

Absolutely agree :(
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Ful path too long. Really?

Post by Jan Rysavy »

Even recent Windows 10 preview builds doesn't support long paths to the point we will be able support it in Salamander.
See for example http://stackoverflow.com/questions/1880 ... in-windows or https://windows.uservoice.com/forums/26 ... limitation

It is possible to implement special "long path" panel mode, but it will be limited only to a few operations such as View or Rename.
User avatar
crystalidea
Posts: 205
Joined: 09 Dec 2005, 15:13
Contact:

Re: Ful path too long. Really?

Post by crystalidea »

Jan, was I correct that moving to Unicode would fix it?
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Ful path too long. Really?

Post by Jan Rysavy »

It is not connected with Unicode support directly. But we need to rewrite all paths related code for Unicode support and it is a good time to implement mentioned (limited) support for long paths. It is the same place in Altap Salamander code.
autocart
Posts: 2
Joined: 03 Sep 2015, 17:41

Re: Ful path too long. Really?

Post by autocart »

Jan Rysavy wrote:But we need to rewrite all paths related code for Unicode support ...
So, don't let yourself stop you from doing it. I almost bought AS but then fortunately stumbled across the Unicode problem in the forums. So, I will not buy it without full Unicode support.
Regards
Stybi
Posts: 5
Joined: 21 Aug 2007, 12:55
Location: Bratislava, Slovakia

Re: Ful path too long. Really?

Post by Stybi »

Hmm... What abou this? Too easy?
#ifndef UNICODE
#undef DeleteFile
#define DeleteFile MyDeleteFileA
#endif

void test()
{
    DeleteFile("C:\\Some\\very\\long\\path");
    DeleteFileW(L"\\\\?\\C:\\Some\\very\\long\\path");
}

BOOL MyDeleteFileA(LPCSTR path)
{
    size_t wpathSize = MultiByteToWideChar(CP_UTF8, 0, path, -1, nullptr, 0);
    if(!wpathSize)
        return FALSE;
    LPWSTR wpath = new WCHAR[wpathSize + 5];
    lstrcpyW(wpath, L"\\\\?\\");
    MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath + 4, wpathSize - 4);
    return DeleteFileW(wpath);
}
Look here: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Ful path too long. Really?

Post by Jan Rysavy »

autocart wrote:
Jan Rysavy wrote:But we need to rewrite all paths related code for Unicode support ...
So, don't let yourself stop you from doing it. I almost bought AS but then fortunately stumbled across the Unicode problem in the forums. So, I will not buy it without full Unicode support.
Regards
Altap Salamander could be tested free of charge and it is a good idea to do it because there could be other features you don't like you will not find in this forum :)
-=Majkl=-
Posts: 80
Joined: 12 Dec 2005, 14:51
Location: Brno, Czech Republic
Contact:

Re: Ful path too long. Really?

Post by -=Majkl=- »

The time has come:

Microsoft removes 260 characters for NTFS Path limit in new Windows 10 insider preview
http://mspoweruser.com/ntfs-260-character-windows-10/
therube
Posts: 674
Joined: 14 Dec 2006, 06:22

Re: Ful path too long. Really?

Post by therube »

manifested win32 applications
What is a manifested application?
So win64 applications need not apply?
Much less other OS.

Is it [Enable NTFS long paths] only available on the "Server" edition (& not that I know anything about Win10)?

Their announcement was mighty terse.

Windows Store applications
A Win10 "thing"? So hopefully something I will never know about.


"Too long" is one of my biggest bugaboos of late.
I even downloaded TC in an attempt to help work around some of them.


And since we're here, find them in a jiffy, Everything 1.4.0.713b.

Code: Select all

path:len:>259 file:
(Modify as needed.)


I have but a handful of (external) manifests.
Everything: ext:manifest


What is a Manifest (in Windows)?
Application Manifest
WinXP Pro SP3 or Win7 x86 | SS 2.54
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Ful path too long. Really?

Post by Jan Rysavy »

Looks like it isn't documented (yet). Some info from reddit: see https://www.reddit.com/comments/4lkoe4

Code: Select all

<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <asmv3:windowsSettings xmlns:dpi="http://schemas.microsoft.com/SMI/2005/WindowsSettings"
                           xmlns:path="http://schemas.microsoft.com/SMI/2016">
        <dpi:dpiAware>True</dpi:dpiAware>
        <path:longPathAware>true</path:longPathAware>
    </asmv3:windowsSettings>
</asmv3:application>
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Ful path too long. Really?

Post by Jan Rysavy »

Another "long paths" thread: http://forum.altap.cz/viewtopic.php?t=32671
Post Reply