Comments (6)
It is all about WebDAV? That is: by calling the WebDAV methods? Or is it in General?
from exist.
This behavior of eXist's core. I think that exception is normal, or better to say, expecting reaction.
@adamretter @wolfgangmm , what do you think?
from exist.
I have been thinking a bit more on this: For me, this kind of protection should be on application level, not on the 'core'. I do not want this protection out of the box, my move command....... should just be moving data.
from exist.
Dannes I have a very hard time understanding why that would be preferable.
1.) This isn't how any other system operates, especially unix. eXist is
suppose to mimic unix as closely as possible...no?
2.) By leaving this logic at the application level this creates a very real
possibility that developers unintentionally create a way for end users to
very easily lose data. (This is already a fact with several eXist
extensions).
3.) Why not have this protection built in, and then have the application
layer override it if they want?...This would give the same exact amount of
control, but would eliminate the possibility of unintentional data loss....
On Mon, Dec 16, 2013 at 2:45 PM, Dannes Wessels [email protected]:
I have been thinking a bit more on this: For me, this kind of protection
should be on application level, not on the 'core'. I do not want this
protection out of the box, my move command....... should just be moving
data.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/99#issuecomment-30693203
.
Casey Jordan
easyDITA a product of Jorsek LLC
"CaseyDJordan" on LinkedIn, Twitter & Facebook
(585) 348 7399
easydita.com
This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law. If you are not the intended recipient,
please be advised that any disclosure copying, distribution, or use of
the information contained herein is prohibited. If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.
from exist.
Casey I agree with you. This has to be recognised as a bug in the core, of course we should never be intentionally orphaning files!
The only question is whether to either:
a) Throw an Exception at (3) if the collection already exists
b) Just overwrite the collection at (3) if the collection already exists
c) Something else...
My preference here would be to avoid exceptions and do (c) i.e. just one-way merge the source to the destination during the copy, this is exactly what happens on a UNIX system. e.g. given the filesystem:
/1/A/hello.txt
/2/A/goodbye.txt
and given the command: "cp -r /1/A /2"
Then, /2/A ends up with both hello.txt and goodbye.txt files, any files with the same name that existed in both /1/A and /2/A would have been overwritten in /2/A by the copy.
I meant to add that, if you need protection
it is up to you to check whether the collection/resource exists before doing the copy/move, just like in UNIX.
from exist.
Adam,
I see the appeal to this approach. It's certainly better than the
alternative. Still makes me nervous though ;) I'd prefer to have a flag
which needed to be set (or two sets of methods) so that it was very clear
to the developer what the function was doing at a quick glance. It would be
verbose, and a bit ugly but super safe.
It's somewhat like the age old practice of creating a new alias for 'mv'
and 'cp' that does some extra checking to prevent accidentally issuing a
command you would regret when working too late some night...
On Mon, Dec 16, 2013 at 3:11 PM, Adam Retter [email protected]:
Casey I agree with you. This has to be recognised as a bug in the core, of
course we should never be intentionally orphaning files!The only question is whether to either:
a) Throw an Exception at (3) if the collection already exists
b) Just overwrite the collection at (3) if the collection already existsMy preference here would be to avoid exceptions and just one-way merge the
source to the destination during the copy, this is exactly what happens on
a UNIX system. e.g. given the filesystem:/1/A/hello.txt
/2/A/goodbye.txtand given the command: "cp -r /1/A /2"
Then, /2/A ends up with both hello.txt and goodbye.txt files, any files
with the same name that existed in both /1/A and /2/A would have been
overwritten in /2/A by the copy.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/99#issuecomment-30695738
.
Casey Jordan
easyDITA a product of Jorsek LLC
"CaseyDJordan" on LinkedIn, Twitter & Facebook
(585) 348 7399
easydita.com
This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law. If you are not the intended recipient,
please be advised that any disclosure copying, distribution, or use of
the information contained herein is prohibited. If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.
from exist.
Related Issues (20)
- Building with Java 21 fails due to ancient Antlr plugin HOT 6
- [BUG] file:serialize does not respect serialization settings
- [BUG] NPE during startup 4.11.1 HOT 3
- [BUG] zip-files-max ignored HOT 1
- [BUG] Packagemanager does not work reliably on windows
- [BUG] NPE thrown on frequent updates of an XML resource HOT 1
- [BUG] named entities in documents with a DTD get swallowed on import HOT 2
- xmldb:rename() function fails if the collection name contains spaces HOT 5
- [BUG] implicit cast to xs:string (exist-db 6.x.x) HOT 1
- HTTP ERROR 500 javax.servlet.ServletException: An error occurred while processing request to /exist/: null after assigning multiple cores to virtual machine HOT 4
- Type checking order problem [BUG] HOT 8
- The eXist database is insisting that my Javascript code is really an Xquery code HOT 5
- Node Comparison returns no data with nested predicate HOT 1
- [BUG] resource leak on Ubuntu 22.04 HOT 5
- [BUG] Attempt to copy temporary document throws NPE, possibly corrupts structural index HOT 1
- [BUG] where clauses do not appear to use indexes as they should, query consequently very slow
- [BUG] Possible memory leak in loop over array containing maps HOT 2
- [BUG] NVD_API_KEY does not get injected for PRs on develop-6.x.x
- [BUG] Multiple outdated JDOM1.x jars are installed
- [feature] Document currently supported and/or eol'ed versions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exist.