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
9a24f14c
Commit
9a24f14c
authored
6 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-4012: don't try to delete meta info which doesn't exists
parent
41569771
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/LocalFileImpl.java
+9
-2
9 additions, 2 deletions
src/main/java/org/olat/core/util/vfs/LocalFileImpl.java
with
9 additions
and
2 deletions
src/main/java/org/olat/core/util/vfs/LocalFileImpl.java
+
9
−
2
View file @
9a24f14c
...
@@ -42,6 +42,7 @@ import org.olat.core.commons.modules.bc.FolderConfig;
...
@@ -42,6 +42,7 @@ import org.olat.core.commons.modules.bc.FolderConfig;
import
org.olat.core.logging.AssertException
;
import
org.olat.core.logging.AssertException
;
import
org.olat.core.logging.OLog
;
import
org.olat.core.logging.OLog
;
import
org.olat.core.logging.Tracing
;
import
org.olat.core.logging.Tracing
;
import
org.olat.core.util.vfs.meta.MetaInfo
;
import
org.olat.core.util.vfs.version.Versionable
;
import
org.olat.core.util.vfs.version.Versionable
;
import
org.olat.core.util.vfs.version.Versions
;
import
org.olat.core.util.vfs.version.Versions
;
import
org.olat.core.util.vfs.version.VersionsManager
;
import
org.olat.core.util.vfs.version.VersionsManager
;
...
@@ -162,7 +163,10 @@ public class LocalFileImpl extends LocalImpl implements VFSLeaf, Versionable {
...
@@ -162,7 +163,10 @@ public class LocalFileImpl extends LocalImpl implements VFSLeaf, Versionable {
}
}
// Versioning makes a copy of the metadata, delete metadata after it
// Versioning makes a copy of the metadata, delete metadata after it
if
(
canMeta
()
==
VFSConstants
.
YES
)
{
if
(
canMeta
()
==
VFSConstants
.
YES
)
{
getMetaInfo
().
delete
();
MetaInfo
meta
=
getMetaInfo
();
if
(
meta
!=
null
)
{
// Meta can be null if the file is already deleted
meta
.
delete
();
}
}
}
return
deleteBasefile
();
return
deleteBasefile
();
}
}
...
@@ -170,7 +174,10 @@ public class LocalFileImpl extends LocalImpl implements VFSLeaf, Versionable {
...
@@ -170,7 +174,10 @@ public class LocalFileImpl extends LocalImpl implements VFSLeaf, Versionable {
@Override
@Override
public
VFSStatus
deleteSilently
()
{
public
VFSStatus
deleteSilently
()
{
if
(
canMeta
()
==
VFSConstants
.
YES
)
{
if
(
canMeta
()
==
VFSConstants
.
YES
)
{
getMetaInfo
().
delete
();
MetaInfo
meta
=
getMetaInfo
();
if
(
meta
!=
null
)
{
meta
.
delete
();
}
}
}
CoreSpringFactory
.
getImpl
(
VersionsManager
.
class
).
delete
(
this
,
true
);
CoreSpringFactory
.
getImpl
(
VersionsManager
.
class
).
delete
(
this
,
true
);
return
deleteBasefile
();
return
deleteBasefile
();
...
...
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