# mod_files.sh patch

- Thread: https://externals.io/message/45185
- Original archive: https://news-web.php.net/php.internals/45185
- Started by Eddie Drapkin on 2009-08-03T05:20:13+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #45185 — Eddie Drapkin — 2009-08-03T05:20:13+00:00

URL: https://externals.io/message/45185#45185

There's a script, mod_files.sh, in ext/session for creating directory
tree with depth X for sessions.  As it stands, it's pretty poorly
documented and very basic.  I got exceptionally bored and rewrote most
of it, the patch is attached.  It runs fine for me in linux (with sh
version 4.0).  I don't have any other *NIX systems to test it out on,
so I can't verify that it works in anything but linux, sorry.

What I changed:

1. Usage now properly reflects arguments, and is better explained.
2. Will create directory given if it doesn't exist
3. Will hop into interactive select if directory already has contents
4. Switched from "test" to "[[ ]]" as it's easier to read and _should_
be just as supported.

---

## #45186 — Eddie Drapkin — 2009-08-03T05:23:27+00:00

URL: https://externals.io/message/45185#45186 · In reply to: #45185

> There's a script, mod_files.sh, in ext/session for creating directory
> tree with depth X for sessions.  As it stands, it's pretty poorly
> documented and very basic.  I got exceptionally bored and rewrote most
> of it, the patch is attached.  It runs fine for me in linux (with sh
> version 4.0).  I don't have any other *NIX systems to test it out on,
> so I can't verify that it works in anything but linux, sorry.
>
> What I changed:
>
> 1. Usage now properly reflects arguments, and is better explained.
> 2. Will create directory given if it doesn't exist
> 3. Will hop into interactive select if directory already has contents
> 4. Switched from "test" to "[[ ]]" as it's easier to read and _should_
> be just as supported.
>

Not to be a moron, but I attached a bad patch.  This is the right one, sorry.

---

## #45221 — johannes@schlueters.de — 2009-08-06T01:10:16+00:00

URL: https://externals.io/message/45185#45221 · In reply to: #45185

Hi,


> There's a script, mod_files.sh, in ext/session for creating directory
> tree with depth X for sessions.  As it stands, it's pretty poorly
> documented and very basic.  I got exceptionally bored and rewrote most
> of it, the patch is attached.  It runs fine for me in linux (with sh
> version 4.0).  I don't have any other *NIX systems to test it out on,
> so I can't verify that it works in anything but linux, sorry.

Can you open a bug report at http://bugs.php.net and refer to the patch
there so it won't be lost? - Thanks!

johannes

---

## #45222 — Eddie Drapkin — 2009-08-06T02:57:42+00:00

URL: https://externals.io/message/45185#45222 · In reply to: #45221

2009/8/5 Johannes Schlüter <johannes@schlueters.de>:
> Hi,
>
> 
> > […]
>
> Can you open a bug report at http://bugs.php.net and refer to the patch
> there so it won't be lost? - Thanks!
>
> johannes
>
>
>

Alright, here you go!
http://bugs.php.net/bug.php?id=49175&

:)
