Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.file.rmdir on non-empty folder #41

Closed
simendsjo opened this issue Mar 11, 2013 · 4 comments
Closed

std.file.rmdir on non-empty folder #41

simendsjo opened this issue Mar 11, 2013 · 4 comments

Comments

@simendsjo
Copy link

[simendsjo@simendsjo-laptop tmp]$ dub init t4
Successfully created an empty project in '/home/simendsjo/code/tmp/t4'.
[simendsjo@simendsjo-laptop tmp]$ cd t4
[simendsjo@simendsjo-laptop t4]$ dub -v run
[7F71AAE21071:00000000 dbg] Using dub registry url 'http://registry.vibed.org/'
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry dyaml
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry vibe-d
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry ddox
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry pegged
[7F71AAE21071:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] Looking for local package map at /home/simendsjo/.dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry dyaml
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry vibe-d
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry ddox
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry pegged
[7F71AAE21071:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] Looking for local package map at /home/simendsjo/.dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry dyaml
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry vibe-d
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry ddox
[7F71AAE21071:00000000 dbg] iterating dir /var/lib/dub/packages/ entry pegged
[7F71AAE21071:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F71AAE21071:00000000 dbg] Looking for local package map at /home/simendsjo/.dub/packages/
[7F71AAE21071:00000000 dbg] Collecting dependencies for t4
[7F71AAE21071:00000000 INF] Checking dependencies in '/home/simendsjo/code/tmp/t4'
[7F71AAE21071:00000000 dbg] dub initialized
[7F71AAE21071:00000000 dbg] Generating using build
[7F71AAE21071:00000000 dbg] Using config application for t4
[7F71AAE21071:00000000 INF] Building configuration application, build type debug
[7F71AAE21071:00000000 dbg] Application output name is '/tmp/dub/1389674440/t4'
[7F71AAE21071:00000000 dbg] Trying to use pkg-config to resolve library flags for [].
[7F71AAE21071:00000000 dbg] pkg-config failed: pkg-config exited with error code 1
[7F71AAE21071:00000000 dbg] Falling back to direct -lxyz flags.
[7F71AAE21071:00000000 INF] Running dmd...
[7F71AAE21071:00000000 dbg] dmd -w -g -debug -of/tmp/dub/1389674440/t4 -I/home/simendsjo/code/tmp/t4/source -J/home/simendsjo/code/tmp/t4/views source/app.d
[7F71AAE21071:00000000 dbg] Running /tmp/dub/1389674440/t4...
Edit source/app.d to start your project.
[7F71AAE21071:00000000 ERR] Error: /tmp/dub/1389674440: Directory not empty

[7F71AAE21071:00000000 dbg] Full exception: std.file.FileException@std/file.d(1318): /tmp/dub/1389674440: Directory not empty
----------------
dub(void std.file.rmdir(const(char[]))+0x64) [0x62ef5c]
dub(void dub.generators.build.BuildGenerator.generateProject(dub.generators.generator.GeneratorSettings)+0x11e6) [0x557cae]
dub(void dub.dub.Dub.generateProject(immutable(char)[], dub.generators.generator.GeneratorSettings)+0xa7) [0x607eab]
dub(_Dmain+0x17a7) [0x547a7b]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain()+0x18) [0x612880]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x6123be]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x3b) [0x6128c7]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x6123be]
dub(_d_run_main+0x1a8) [0x612378]
dub(main+0x17) [0x6121cb]
/usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f71aa035a15]
[7F71AAE21071:00000000 INF] Run 'dub help' for usage information.
@simendsjo
Copy link
Author

Using dub 0.9.11

@mdondorff
Copy link
Contributor

Should be fixed by ebb5849 from sludwig.

@s-ludwig
Copy link
Member

I think it's not yet fixed - will check tomorrow.

@s-ludwig s-ludwig reopened this Mar 19, 2013
@s-ludwig
Copy link
Member

s-ludwig commented Apr 9, 2013

The fix now simply is to use rmdirRecurse instead of rmdir. This means that any files created by the application will now also be deleted if they are in the same temporary folder, but I thinkt that's more desirable that leaving a bunch of orphaned folders around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants