Skip to content

Corrupt file after editing/saving on macOS SMB share #14300

@TaleTN

Description

@TaleTN

Description of the Issue

When saving a file on a macOS SMB share that was previously longer, the size doesn't actually change, resulting in duplicate data near the end of the file, thus kinda corrupting the file in the process.

Steps to Reproduce the Issue

  1. Create a text file with different 3 lines (of the same length, because that makes it easier to explain/test the issue).
  2. Save it on a macOS SMB share.
  3. Delete the 2nd (middle) line.
  4. Save the file again.
  5. Reload from Disk (or load the file in Windows Notepad or macOS TextEdit).

Expected Behavior

I would expect a file with only 2 lines, and the file size should now be smaller.

Actual Behavior

There are still 3 lines in the file; the last 2 lines are now the same. Also, the file size hasn't changed.

This is with Noteapad++ v8.5.8, but it doesn't seem to happen with v8.5.7 (and probably earlier, because I haven't encountered this issue before). When saving the file directly on my Windows machine this doesn't happen, nor when saving it on a Windows network share.

Debug Information

Notepad++ v8.5.8 (64-bit)
Build time : Oct 15 2023 - 21:43:56
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "\smbshare\username\test.txt"
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 22H2
OS Build : 19045.3636
Current ANSI codepage : 1252
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions