hansva opened a new issue, #8841:
URL: https://github.com/apache/hop/issues/8841

   ### Apache Hop version?
   
   2.20
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   Symptom
   On S3 (and S3-compatible stores), a folder that exists only as a key prefix, 
with no folder/ marker object, can turn into a non-existent (IMAGINARY) file 
object. This happens after it has been resolved once and its parent folder is 
listed again. In practice the subfolder may disappear when you browse back to 
its parent in the file dialog, and file masks may skip it.
   
   Steps to reproduce
   
   Upload data/sub/file.txt to a bucket. Don't create a data/sub/ marker object.
   resolveFile("s3://bucket/data").getChildren(): the listing populates the 
list cache.
   resolveFile("s3://bucket/data/sub").getType() returns folder.
   Call getChildren() on data again: sub is now reported as imaginary.
   If the subfolder is resolved directly without listing its parent first, it 
stays a folder.
   
   Cause
   S3CommonFileObject.doAttach() permanently appends / to the object's key 
field when it detects a folder. The next attach starts from that changed key:
   
   S3ListCache.parentPrefix("data/sub/") returns data/sub/ instead of data/, so 
the list cache lookup misses;
   the fallback checks then use data/sub//, which doesn't exist;
   so the type ends up IMAGINARY.
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: VFS


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to