Bug 27961 - Can't remove symbolic link referring to itself
Summary: Can't remove symbolic link referring to itself
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-12 11:00 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2015-03-12 11:00 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Rolf Bjarne Kvinge [MSFT] 2015-03-12 11:00:55 UTC
$ ln -s f f
$ ls -la f
lrwxr-xr-x  1 rolf  staff  1 Mar 12 16:00 f -> f
$ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> System.IO.File.Delete ("f"); 
Unknown errno: Too many levels of symbolic links

Unknown errno: Too many levels of symbolic links

System.IO.IOException: Win32 IO returned ERROR_GEN_FAILURE. Path: f
  at System.IO.File.Delete (System.String path) [0x00000] in <filename unknown>:0 
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0 
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0 
csharp>

Note You need to log in before you can comment on or make changes to this bug.