douxiduan8344
douxiduan8344
2017-02-27 12:05

使用os.Rename移动文件,触发CREATE然后CHMOD

已采纳

using go's os like so:

os.Rename(oldpath,newpath)

and watching the destination folder using fsnotify

causes 2 events to fire, CREATE and CHMOD

can't seem to understand why CHMOD is fired.

  • tried listening with python's watchdog shows 2 events as well, file creation and folder modification.

  • parent folder perms are 0777 file perms are 0666 (default).

  • I'm on macOS
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • doudg60800 doudg60800 4年前

    @JimB pointed me to the correct answer, this is a bug concerning with macOS spotlight indexing.

    If anyone want's to track this, reported bug

    点赞 评论 复制链接分享

相关推荐