mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [0002527] Individual files deleted to trash remain in original folder
This commit is contained in:
parent
cc5a23df0f
commit
cf7604d242
1 changed files with 4 additions and 2 deletions
|
|
@ -207,8 +207,11 @@ begin
|
|||
// Get user home directory
|
||||
sHomeDir:= GetHomeDir;
|
||||
// Check if file in home directory
|
||||
if (fpLStat(UTF8ToSys(sHomeDir), st1) >= 0)
|
||||
// If it's a file, stat the parent directory instead for correct behavior on OverlayFS,
|
||||
// it shouldn't make any difference in other cases
|
||||
if (fpStat(UTF8ToSys(sHomeDir), st1) >= 0)
|
||||
and (fpLStat(UTF8ToSys(FileName), st2) >= 0)
|
||||
and (fpS_ISDIR(st2.st_mode) or (fpStat(UTF8ToSys(ExtractFileDir(FileName)), st2) >= 0))
|
||||
and (st1.st_dev = st2.st_dev) then
|
||||
begin
|
||||
// Get trash directory in $XDG_DATA_HOME
|
||||
|
|
@ -328,4 +331,3 @@ initialization
|
|||
{$ENDIF}
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue