Page 1 of 2

Ful path too long. Really?

Posted: 26 May 2015, 16:39
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]
---------------------------

Re: Ful path too long. Really?

Posted: 26 May 2015, 20:20
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

Re: Ful path too long. Really?

Posted: 26 May 2015, 23:03
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 :( :( :(

Re: Ful path too long. Really?

Posted: 30 May 2015, 18:59
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?

Re: Ful path too long. Really?

Posted: 31 May 2015, 14:19
by crystalidea
Absolutely agree :(

Re: Ful path too long. Really?

Posted: 01 Jun 2015, 11:28
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.

Re: Ful path too long. Really?

Posted: 01 Jun 2015, 16:35
by crystalidea
Jan, was I correct that moving to Unicode would fix it?

Re: Ful path too long. Really?

Posted: 02 Jun 2015, 07:35
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.

Re: Ful path too long. Really?

Posted: 07 Sep 2015, 08:05
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

Re: Ful path too long. Really?

Posted: 26 Oct 2015, 14:18
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

Re: Ful path too long. Really?

Posted: 26 Oct 2015, 14:26
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 :)

Re: Ful path too long. Really?

Posted: 29 May 2016, 23:13
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/

Re: Ful path too long. Really?

Posted: 30 May 2016, 12:44
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

Re: Ful path too long. Really?

Posted: 30 May 2016, 14:59
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>

Re: Ful path too long. Really?

Posted: 15 Sep 2016, 10:10
by Jan Rysavy
Another "long paths" thread: http://forum.altap.cz/viewtopic.php?t=32671