Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
3fca8dc5
Commit
3fca8dc5
authored
13 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-23: add more patterns for temporary files and lock files which are not versioned in OpenOLAT
parent
4111e31f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/util/vfs/version/VersionsFileManager.java
+23
-6
23 additions, 6 deletions
...a/org/olat/core/util/vfs/version/VersionsFileManager.java
with
23 additions
and
6 deletions
src/main/java/org/olat/core/util/vfs/version/VersionsFileManager.java
+
23
−
6
View file @
3fca8dc5
...
...
@@ -393,22 +393,39 @@ public class VersionsFileManager extends VersionsManager implements Initializabl
}
/**
* Some temporary files of specific editors need to be force deleted
* Some temporary
/lock
files of specific editors need to be force deleted
* with all versions. Word can reuse older names.
* @param leaf
* @return
*/
private
boolean
isTemporaryFile
(
VFSLeaf
leaf
)
{
String
name
=
leaf
.
getName
();
//temporary files of Word 2010: ~WRD0002.tmp
if
((
name
.
startsWith
(
"~WRD"
)
||
name
.
startsWith
(
"~WRL"
))
&&
name
.
endsWith
(
".tmp"
))
{
//temporary files
if
(
name
.
endsWith
(
".tmp"
))
{
//Word 2010: ~WRD0002.tmp
if
(
name
.
startsWith
(
"~WRD"
)
||
name
.
startsWith
(
"~WRL"
))
{
return
true
;
}
//PowerPoint 2010: ppt5101.tmp
if
(
name
.
startsWith
(
"ppt"
))
{
return
true
;
}
}
//lock files of Word 2010, Excel 2010, PowerPoint 2010:
if
(
name
.
startsWith
(
"~$"
)
&&
(
name
.
endsWith
(
".docx"
)
||
name
.
endsWith
(
".xlsx"
)
||
name
.
endsWith
(
".pptx"
)))
{
return
true
;
}
//OpenOffice locks: .~lock.Versions_21.odt#
if
(
name
.
startsWith
(
".~lock."
)
&&
(
name
.
endsWith
(
".odt#"
)
/* Writer */
||
name
.
endsWith
(
".ods#"
)
/* Calc */
||
name
.
endsWith
(
".odp#"
)
/* Impress */
||
name
.
endsWith
(
"odf#"
)
/* Math */
||
name
.
endsWith
(
".odg#"
)
/* Draw */
))
{
return
true
;
}
//
temporary files of PowerPoint 2010: ppt5101.tmp
if
(
name
.
startsWith
(
"ppt"
)
&&
name
.
endsWith
(
".
tmp
"
))
{
//
OpenOffice database lock
if
(
name
.
endsWith
(
".
odb.lck
"
))
{
return
true
;
}
//OpenOffice Text: .~lock.Versions_21.odt#
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment