#2605 closed defect (somebody else's problem)

Magic Folder on Windows: ignore files with hidden or system attributes

Reported by: daira Owned by: meejah
Priority: normal Milestone: undecided
Component: code-frontend-magic-folder Version: n/a
Keywords: magic-folder usability windows Cc:
Launchpad Bug:

Description

The Magic Folder remote-to-local-sync specification says:

"Hidden" files, and files with names matching the patterns used for backup, temporary, and conflicted files, will be ignored, i.e. not synchronized in either direction. A file is hidden if it has a filename beginning with "." (on any platform), or has the hidden or system attribute on Windows.

Checking for the hidden or system attribute is not currently implemented.

Change History (5)

comment:1 Changed at 2015-12-04T22:05:13Z by daira

This is not a blocker for merging Magic Folder to trunk.

comment:2 Changed at 2015-12-08T01:26:06Z by daira

https://bugs.python.org/issue21719 says that there is no Python 2.7 API for this. Therefore, a ctypes call to either GetFileAttributesW or GetFileAttributesEx is needed. Note that we already lstat the file in get_pathinfo before deciding whether to upload it, but I guess that determining whether it is hidden/system does not need to be atomic with that, therefore the simpler GetFileAttributesW API would be sufficient. The ctypes call should be implemented in fileutil.py.

Version 0, edited at 2015-12-08T01:26:06Z by daira (next)

comment:3 Changed at 2015-12-08T01:28:45Z by daira

I suggest implementing a fileutil.is_hidden_or_system function that always returns False on non-Windows platforms.

comment:4 Changed at 2015-12-14T21:51:29Z by daira

  • Owner changed from daira to meejah

comment:5 Changed at 2020-06-30T13:44:17Z by exarkun

  • Resolution set to somebody else's problem
  • Status changed from new to closed

magic-folder has been split out into a separate project - https://github.com/leastauthority/magic-folder

Note: See TracTickets for help on using tickets.