You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2024/05/08 15:38:40 UTC

(jackrabbit-filevault) branch JCRVLT-745 created (now 951eea85)

This is an automated email from the ASF dual-hosted git repository.

reschke pushed a change to branch JCRVLT-745
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git


      at 951eea85 JCRVLT-745: stashing: move '/' to last in folder list, rename temp node to be easier to recognize

This branch includes the following new commits:

     new 951eea85 JCRVLT-745: stashing: move '/' to last in folder list, rename temp node to be easier to recognize

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(jackrabbit-filevault) 01/01: JCRVLT-745: stashing: move '/' to last in folder list, rename temp node to be easier to recognize

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch JCRVLT-745
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git

commit 951eea85101c3a3a0e5599eb65ce6826d19206ef
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Wed May 8 16:38:23 2024 +0100

    JCRVLT-745: stashing: move '/' to last in folder list, rename temp node to be easier to recognize
---
 .../main/java/org/apache/jackrabbit/vault/fs/impl/io/NodeStash.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/NodeStash.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/NodeStash.java
index 8629a53a..0d7282e6 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/NodeStash.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/NodeStash.java
@@ -61,7 +61,7 @@ public class NodeStash {
      * List of potential roots where the transient temporary node will be created.
      * Note that the node is never persisted.
      */
-    private static final String[] ROOTS = {"/", "/tmp", "/var", "/etc", "/content"};
+    private static final String[] ROOTS = {"/tmp", "/var", "/etc", "/content", "/"};
 
 
     /** The property names of those protected properties which should be stashed (and later restored) */
@@ -90,7 +90,7 @@ public class NodeStash {
             for (String rootPath : ROOTS) {
                 try {
                     Node root = session.getNode(rootPath);
-                    return tmpNode = root.addNode("tmp" + System.currentTimeMillis(), JcrConstants.NT_UNSTRUCTURED);
+                    return tmpNode = root.addNode("filevault-tmp-" + System.currentTimeMillis(), JcrConstants.NT_UNSTRUCTURED);
                 } catch (RepositoryException e) {
                     log.debug("unable to create temporary stash location below {}.", rootPath);
                 }