Thanks,

All these files have the build_number + build_id as part of their names. 

-----Original Message-----
From: [email protected] <[email protected]> On Behalf 
Of Daniel Beck
Sent: יום ו 13 נובמבר 2020 00:28
To: Jenkins Developers <[email protected]>
Subject: Re: Writing from Slave To Master



> On 12. Nov 2020, at 22:40, Tal Yanai <[email protected]> wrote:
> 
> String buildDir = build.getRootDir().getAbsolutePath();
> FilePath masterDirectory = new FilePath(new File(buildDir + File.separator + 
> fileName));

As all paths here are on the master, is this the same as the following?

FilePath masterDirectory = build.getRootDir().child(fileName)

Would still not recommend storing files directly in the build dir; most plugins 
create subdirectories and store their build data there. Otherwise your files 
may collide with others; and if user controlled file names are involved, even 
without path traversal, replace build.xml etc.

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/jenkinsci-dev/I0WuyxdA9Nc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/E5C82C3F-99A4-4557-BBD4-E534658AF557%40beckweb.net.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/004101d6b943%24f993aac0%24ecbb0040%24%40yanai.org.il.

Reply via email to