LFN deletion

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Posts: 3015
Joined: Thu Sep 03, 2009 6:48 pm

LFN deletion

Post by therube » Fri Jun 11, 2021 2:56 pm

LFN deletion

deletion of LFN, or mixed LFN & SFN...
/may/ automatically select to permanently delete said files
/may/ attempt to delete SFN & permanently delete LFN

- it may not be particularly apparent to a user what might
be happening, & if they're not paying attention, they may
end up permanently deleting when they weren't looking to
do that at all, or they may expect that SFN goes to Recycle Bin
& LFN gets permanant delete - but that might not be the case...

Code: Select all

SFN... path parts  46 + name part  66, total 112 (that's short for me ;-))
LFN... part parts 110 + name part 193, total 303 (ditto ;-))
sfn/lfn, DEL, move 2 items to Recycle Bin?
(followed up by)
Are you sure you want to PERMANENTLY delete these 2 items
(at that point, SFN *was* PERMANENTLY deleted)
Destination Path Too Long:
the file name(s) would be too long for the destination folder... (Skip | Cancel)

i'm pretty sure, well maybe*, different combinations, maybe orderings, are apt to present
different scenarios as to what might or might not happen?

in any case, it's potentially a sort of a mess

given above circumstances, would have expected at least that the SFN was deleted to
Recycle Bin & a (Windows) prompt regarding LFN (being too long)

if i'm recalling, well maybe*, earlier 1.5's would have worked in that manner?


Site Admin
Posts: 7179
Joined: Fri Oct 16, 2009 11:31 pm

Re: LFN deletion

Post by void » Sun Jun 13, 2021 2:27 am

The following error is shown if you try to delete a folder with a really long filename:

This dialog is shown by the shell (not Everything).
I agree, it is dangerous to prompt to permanently delete when the user initiated a delete to recycle bin action.
An error dialog would be preferred.

It is easier to reproduce the issue with a long folder name than a file, as the folder name is preserved when moving it to the recycle bin.

I will consider an option to override the shell permanently delete dialog and show an error instead, forcing the user to shift + delete.

Earlier versions of 1.5 handled really long filenames on its own.
Current versions will use the shell if the short path is less than 260 characters.

Disable shell_short_path if you want this old behavior.
If disabled, you will lose a lot of the nice shell dialogs for really long filenames.

Posts: 10
Joined: Sun Nov 14, 2010 4:31 pm

Re: LFN deletion

Post by reddevil » Tue Jul 20, 2021 6:16 pm

Windows 10 now allows long path file names via group policy or regedit.

To enable Win10 more than 260 length long path names, set in regedit:

To disable:

How will the above scenario behave with the registry hack enabling long paths?

Site Admin
Posts: 7179
Joined: Fri Oct 16, 2009 11:31 pm

Re: LFN deletion

Post by void » Tue Jul 20, 2021 10:08 pm

These settings only apply to low level Windows API calls.

The Windows shell is still limited to 260 characters (including the nul character).

Short paths can be used to get around this limit in some cases.

Enabling LongPathsEnabled might help indirectly when the short-paths are expanded.

Post Reply