Skip to content

Commit

Permalink
fix: exception when deleting physical files created with CRTPF
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Gorzinski <[email protected]>
  • Loading branch information
ThePrez committed Mar 22, 2024
1 parent b9ffed6 commit 5ac3b49
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/com/ibm/as400/access/IFSFileImplRemote.java
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,11 @@ public boolean isHidden()

return result;
}

private boolean isInQsys() {
String lowercasePath = fd_.path_.toLowerCase().replaceAll("//+","/");
return lowercasePath.equals("/qsys.lib") || lowercasePath.startsWith("/qsys.lib/");
}

/**
Determines if the integrated file system object represented by this
Expand Down Expand Up @@ -1827,6 +1832,12 @@ public boolean isSymbolicLink()
//
if (!determinedIsSymbolicLink_)
{
// QSYS doesn't support symbolic links, so no need to check
if(isInQsys()) {
isSymbolicLink_ = false;
determinedIsSymbolicLink_ = true;
return isSymbolicLink_;
}
// Note: As of V5R3, we can't get accurate symbolic link info by querying the attrs of a specific file.
// Instead, we must query the contents of the parent directory.
int pathLen = fd_.path_.length();
Expand Down

0 comments on commit 5ac3b49

Please sign in to comment.