Giter VIP home page Giter VIP logo

Comments (6)

dizzzz avatar dizzzz commented on August 28, 2024

It is all about WebDAV? That is: by calling the WebDAV methods? Or is it in General?

from exist.

shabanovd avatar shabanovd commented on August 28, 2024

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.

dizzzz avatar dizzzz commented on August 28, 2024

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.

caseydawsonjordan avatar caseydawsonjordan commented on August 28, 2024

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.

adamretter avatar adamretter commented on August 28, 2024

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.

caseydawsonjordan avatar caseydawsonjordan commented on August 28, 2024

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 exists

My 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.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.


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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.