Return st_nlink of 1 for mirrored index files
GitLab issue #676. Thanks to Ezio Vernacotola (@eziove) for the report and solution. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -23,6 +23,8 @@
|
|||||||
- Move Celery and Django Celery dependencies
|
- Move Celery and Django Celery dependencies
|
||||||
to the task manager app.
|
to the task manager app.
|
||||||
- Improve dependecies app tests.
|
- Improve dependecies app tests.
|
||||||
|
- Return st_nlink of 1 files in mirrored indexes. GitLab issue #676.
|
||||||
|
Thanks to Ezio Vernacotola (@eziove) for the report and solution.
|
||||||
|
|
||||||
3.2.8 (2019-10-01)
|
3.2.8 (2019-10-01)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ Backward incompatible changes
|
|||||||
Bugs fixed or issues closed
|
Bugs fixed or issues closed
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
- :gitlab-issue:`676` Access fuse mounted index via samba
|
||||||
- :gitlab-issue:`677` Django start before PostgreSQL is up.
|
- :gitlab-issue:`677` Django start before PostgreSQL is up.
|
||||||
- :forum-topic:`1347` Workflow state action: perform a POST request
|
- :forum-topic:`1347` Workflow state action: perform a POST request
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ class IndexFilesystem(Operations):
|
|||||||
if not result:
|
if not result:
|
||||||
raise FuseOSError(ENOENT)
|
raise FuseOSError(ENOENT)
|
||||||
|
|
||||||
|
# st_nlink tracks the number of hard links to a file.
|
||||||
|
# Must be 2 for directories and at least 1 for files
|
||||||
|
# https://www.gnu.org/software/libc/manual/html_node/Attribute-Meanings.html
|
||||||
if isinstance(result, IndexInstanceNode):
|
if isinstance(result, IndexInstanceNode):
|
||||||
return {
|
return {
|
||||||
'st_mode': (S_IFDIR | DIRECTORY_MODE), 'st_ctime': now,
|
'st_mode': (S_IFDIR | DIRECTORY_MODE), 'st_ctime': now,
|
||||||
@@ -161,7 +164,8 @@ class IndexFilesystem(Operations):
|
|||||||
result.latest_version.timestamp.replace(tzinfo=None) - result.latest_version.timestamp.utcoffset() - datetime.datetime(1970, 1, 1)
|
result.latest_version.timestamp.replace(tzinfo=None) - result.latest_version.timestamp.utcoffset() - datetime.datetime(1970, 1, 1)
|
||||||
).total_seconds(),
|
).total_seconds(),
|
||||||
'st_atime': now,
|
'st_atime': now,
|
||||||
'st_size': result.size
|
'st_size': result.size,
|
||||||
|
'st_nlink': 1
|
||||||
}
|
}
|
||||||
|
|
||||||
def open(self, path, flags):
|
def open(self, path, flags):
|
||||||
|
|||||||
Reference in New Issue
Block a user