Skip to content

lib/osutil: Preserve perms in AtomicWriter (fixes #6886) - #6885

Merged
imsodin merged 1 commit into
syncthing:mainfrom
imsodin:osutil/atomicWriterPerms
Aug 10, 2020
Merged

imsodin merged 1 commit into
syncthing:mainfrom
imsodin:osutil/atomicWriterPerms

Conversation

@imsodin

@imsodin imsodin commented Aug 9, 2020 •

Copy link
Copy Markdown
Member

Preserves permissions if a file is replaced/truncated. Reported in https://forum.syncthing.net/t/preserve-chmod-permission-after-editing-stignore-via-webui/15461, waiting for the issue (number) to fix the commit msg.

@imsodin imsodin changed the title lib/osutil: Preserve perms in AtomicWriter (fixes #tbd) lib/osutil: Preserve perms in AtomicWriter (fixes #6886) Aug 9, 2020
@imsodin
imsodin marked this pull request as ready for review August 9, 2020 18:12
@imsodin
imsodin merged commit fd8bea6 into syncthing:main Aug 10, 2020
@imsodin
imsodin deleted the osutil/atomicWriterPerms branch August 10, 2020 16:49
Comment thread lib/osutil/atomic.go
w.err = err
return err
}
if info != nil {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Info might theoretically be non-nil yet garbage if the file didn't exist. (As in I think info is undefined if err != nil)

imsodin added a commit to imsodin/syncthing that referenced this pull request Aug 10, 2020
imsodin added a commit to imsodin/syncthing that referenced this pull request Aug 10, 2020
imsodin added a commit to imsodin/syncthing that referenced this pull request Aug 10, 2020
@imsodin imsodin mentioned this pull request Aug 11, 2020
Closed
@calmh calmh added this to the v1.9.0 milestone Aug 18, 2020
calmh added a commit to calmh/syncthing that referenced this pull request Aug 19, 2020
* main: (368 commits)
  build: We now target Go 1.14
  lib/fs: Disable ioctl on ppc (fixes syncthing#6898) (syncthing#6901)
  gui, man, authors: Update docs, translations, and contributors
  lib/dialer: Try dialing without reuse in parallel (fixes syncthing#6892) (syncthing#6893)
  cmd/stcrashreceiver: Don't crash on nil err
  all: Remove need to restart syncthing (syncthing#6883)
  lib/db: Don't put truncated files (ref syncthing#6855, ref syncthing#6501) (syncthing#6888)
  lib/osutil: Check returned error instead of info (ref syncthing#6885) (syncthing#6887)
  gui, man, authors: Update docs, translations, and contributors
  lib/osutil: Preserve perms in AtomicWriter (fixes #tbd) (syncthing#6885)
  lib/fs: Fix WatchRename test for FreeBSD (fixes syncthing#6613)
  lib/fs: Unwrap mtimeFile, get fd the "correct" way (ref syncthing#6875) (syncthing#6877)
  lib/model: Don't close file early (fixes syncthing#6875) (syncthing#6876)
  lib/fs: Unwrap mtimeFile, get fd the "correct" way (ref syncthing#6875) (syncthing#6877)
  gui, man, authors: Update docs, translations, and contributors
  lib/fs: Fix WatchRename test for FreeBSD (fixes syncthing#6613)
  lib/model: Don't close file early (fixes syncthing#6875) (syncthing#6876)
  lib/db: Log context on panic (syncthing#6872)
  gui: Don't show pull order on SO folders (ref syncthing#6807) (syncthing#6871)
  lib/model: Check folder error before sync-waiting (fixes syncthing#6793) (syncthing#6847)
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Aug 11, 2021
@syncthing syncthing locked and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants