Update OBEX lib setPath Flags handling logic to be compatible with spec.
From IrOBEX, 3.3.6.1, we can see below explanation for Flags bit 1:
1 Don't create directory if it does not exist, return an error instead.
The correct understanding should be: if bit 1 is set to 1, we'll not create
directory if it not exist; if bit 1 is set to 0, we'll create it if it not
exists.
diff --git a/obex/javax/obex/ServerSession.java b/obex/javax/obex/ServerSession.java
index aca90bb..503d440 100644
--- a/obex/javax/obex/ServerSession.java
+++ b/obex/javax/obex/ServerSession.java
@@ -315,7 +315,7 @@
if (!((flags & 1) == 0)) {
backup = true;
}
- if ((flags & 2) == 0) {
+ if (!((flags & 2) == 0)) {
create = false;
}