Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
d93bd1ad
Unverified
Commit
d93bd1ad
authored
Oct 09, 2021
by
mordini
Committed by
GitHub
Oct 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: git storage - 'import everything' feature restored (#4559) (#4572)
parent
cd98c975
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
storage.js
server/modules/storage/git/storage.js
+6
-5
No files found.
server/modules/storage/git/storage.js
View file @
d93bd1ad
...
...
@@ -181,7 +181,7 @@ module.exports = {
if
(
!
item
.
binary
&&
contentType
)
{
// -> Page
if
(
fileExists
&&
item
.
relPath
!==
item
.
oldPath
)
{
if
(
fileExists
&&
!
item
.
importAll
&&
item
.
relPath
!==
item
.
oldPath
)
{
// Page was renamed by git, so rename in DB
WIKI
.
logger
.
info
(
`(STORAGE/GIT) Page marked as renamed: from
${
item
.
oldPath
}
to
${
item
.
relPath
}
`
)
...
...
@@ -195,7 +195,7 @@ module.exports = {
destinationLocale
:
contentPath
.
locale
,
skipStorage
:
true
})
}
else
if
(
!
fileExists
&&
item
.
deletions
>
0
&&
item
.
insertions
===
0
)
{
}
else
if
(
!
fileExists
&&
!
item
.
importAll
&&
item
.
deletions
>
0
&&
item
.
insertions
===
0
)
{
// Page was deleted by git, can safely mark as deleted in DB
WIKI
.
logger
.
info
(
`(STORAGE/GIT) Page marked as deleted:
${
item
.
relPath
}
`
)
...
...
@@ -224,7 +224,7 @@ module.exports = {
}
else
{
// -> Asset
if
(
fileExists
&&
((
item
.
before
===
item
.
after
)
||
(
item
.
deletions
===
0
&&
item
.
insertions
===
0
)))
{
if
(
fileExists
&&
!
item
.
importAll
&&
((
item
.
before
===
item
.
after
)
||
(
item
.
deletions
===
0
&&
item
.
insertions
===
0
)))
{
// Asset was renamed by git, so rename in DB
WIKI
.
logger
.
info
(
`(STORAGE/GIT) Asset marked as renamed: from
${
item
.
oldPath
}
to
${
item
.
relPath
}
`
)
...
...
@@ -240,7 +240,7 @@ module.exports = {
WIKI
.
logger
.
info
(
`(STORAGE/GIT) Asset was not found in the DB, nothing to rename:
${
item
.
relPath
}
`
)
}
continue
}
else
if
(
!
fileExists
&&
((
item
.
before
>
0
&&
item
.
after
===
0
)
||
(
item
.
deletions
>
0
&&
item
.
insertions
===
0
)))
{
}
else
if
(
!
fileExists
&&
!
item
.
importAll
&&
((
item
.
before
>
0
&&
item
.
after
===
0
)
||
(
item
.
deletions
>
0
&&
item
.
insertions
===
0
)))
{
// Asset was deleted by git, can safely mark as deleted in DB
WIKI
.
logger
.
info
(
`(STORAGE/GIT) Asset marked as deleted:
${
item
.
relPath
}
`
)
...
...
@@ -427,7 +427,8 @@ module.exports = {
relPath
,
file
,
deletions
:
0
,
insertions
:
0
insertions
:
0
,
importAll
:
true
}],
rootUser
)
}
cb
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment