Using P4JAVA with JDK6 on Unix: Client.sync() ignores the execute bit

273 Views Asked by At
  1. Using p4java-2011.1.297684 with Java 6 on Solaris
  2. Running p4 sync -f on the given file will sync the file w/ the execute bit set correctly.
  3. Calling client.sync(List, true, false, false, false) does NOT set the execute bit.
  4. I also tried implementing my own ISystemFileCommandsHelper and registering it (as opposed to the default):

    ServerFactory.setRpcFileSystemHelper(new MySystemFileCommandsHelper());

    ...

    public class MySystemFileCommandsHelper implements ISystemFileCommandsHelper {

    ...

    public boolean setExecutable(String file, boolean executable, boolean ownerOnly) {
        File f = new File(file);
    
        System.out.println("Calling... 2");
        return f.setExecutable(executable, ownerOnly);
    }
    

    ... }

But also no luck; I also don't see anything logged or printed.

Is there a setting or property that controls the use of the SystemFileCommandsHelper?

Thanks in advance.

1

There are 1 best solutions below

2
On

What's the Perforce file type of the file in question? I think it should work correctly for text+x or binary+x files, but it looks like there's a bug where unicode files (file type unicode+x) won't have the executable bit set.