mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: properly add owner object to fsentries
This commit is contained in:
parent
a70d0dd088
commit
04c05a5bb8
@ -777,6 +777,16 @@ module.exports = class FSNodeContext {
|
|||||||
fsentry[k] = res[k];
|
fsentry[k] = res[k];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let actor; try {
|
||||||
|
actor = Context.get('actor');
|
||||||
|
} catch (e) {}
|
||||||
|
if ( ! actor?.type?.user || actor.type.user.id !== res.user_id ) {
|
||||||
|
if ( ! fsentry.owner ) await this.fetchOwner();
|
||||||
|
fsentry.owner = {
|
||||||
|
username: res.owner?.username,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const info = this.services.get('information');
|
const info = this.services.get('information');
|
||||||
|
|
||||||
if ( ! this.uid && ! this.entry.uuid ) {
|
if ( ! this.uid && ! this.entry.uuid ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user